Java OCA OCP Practice Question 513

Question

Which modifier(s) should be used to denote a variable that should not be written out as part of its class's persistent state? (Choose the shortest possible answer.)

  • A. private
  • B. protected
  • C. private protected
  • D. transient
  • E. volatile


D.

Note

A and B are access modifiers.

C is an illegal combination of two access modifiers.

E "volatile" is used for certain multi-threaded situations.




PreviousNext

Related