Java OCA OCP Practice Question 53

Question

Which of the following are true?

Choose all that apply.

  • A. An enum definition may contain the main() method of an application.
  • B. You can call an enum's toString() method.
  • C. You can call an enum's wait() method.
  • D. You can call an enum's notify() method.


A, B, C, D.

Note

Enums may contain public static void main() methods and may serve as application main classes. Enums inherit from Object, so they have toString(), wait(), and notify() methods.




PreviousNext

Related