Java OCA OCP Practice Question 1198

Question

Suppose you are writing a class that provides custom deserialization.

The class implements java.io.Serializable and not java.io.Externalizable.

What method should implement the custom deserialization, and what is its access mode?

  • A. private readObject()
  • B. public readObject()
  • C. private readExternal()
  • D. public readExternal()


A.

Note

The readObject() method must be private.




PreviousNext

Related