Exam 1z0-819 All QuestionsBrowse all questions from this exam
Question 64

Given:

You want to implement the java.io.Serializable interface to the MyPersistenceData class.

Which method should be overridden?

    Correct Answer: B

    To implement the java.io.Serializable interface to the MyPersistenceData class, you don't need to override any methods. The Serializable interface is a marker interface, which means it does not declare any methods that need to be implemented. It simply marks the class as being serializable, meaning its objects can be converted into a byte stream and subsequently restored. Therefore, the correct option is B.

Discussion
StavokOption: B

To implement the java.io.Serializable interface to the MyPersistenceData class, you don’t need to override any methods. The Serializable interface is a marker interface that doesn’t have any methods. It simply indicates that the class is serializable and its objects can be written to and read from a stream. Therefore, the correct answer is B. nothing.

ObaltOption: B

Correct answer is B

mendjijetOption: B

B is ok java.io.Serializable is a marker interface

d7bb0b2Option: B

B. nothing When a class implements the java.io.Serializable interface, it does not need to override any methods. This interface is a marker interface and does not contain any methods. Serialization and deserialization are handled automatically by the Java Virtual Machine (JVM).

belal97Option: B

B is correct interface Serializable does not have any method

tmuralimanoharOption: C

Answer: C