Java OCA OCP Practice Question 163

Question

P:Suppose you are writing a class that will provide custom deserialization.

The class implements java.io.Serializable (not java.io.Externalizable).

What access mode should the readObject() method have?

  • A. public
  • B. protected
  • C. default
  • D. private


D.

Note

Default deserialization is only bypassed if the readObject() method has private access.




PreviousNext

Related