Java OCA OCP Practice Question 483

Question

Suppose class A extends Object; Class B extends A; and class C extends B.

Of these, only class C implements java.io.Externalizable.

Which of the following must be true in order to avoid an exception during deserialization of an instance of C?

  • A. A must have a no-args constructor.
  • B. B must have a no-args constructor.
  • C. C must have a no-args constructor.
  • D. There are no restrictions regarding no-args constructors.


C.

Note

An externalizable object must have a no-args constructor.




PreviousNext

Related