Java OCA OCP Practice Question 412

Question

Which of the following statements is true?

  • A. Transient methods may not be overridden.
  • B. Transient methods must be overridden.
  • C. Transient classes may not be serialized.
  • D. Transient variables must be static.
  • E. Transient variables are not serialized.


E.

Note

A, B, and C are wrong because only variables may be transient, not methods or classes.

D is false because transient variables need not be static.

E is the definition of transient.




PreviousNext

Related