Java OCA OCP Practice Question 1506

Question

Which of the following properties of an enum can be marked abstract?

  • A. The enum class definition
  • B. An enum method
  • C. An enum value
  • D. None of the above


B.

Note

An enum cannot be marked abstract, nor can any of its values, but its methods can be marked abstract, making Option B the correct answer.

If an enum contains an abstract method, then every enum value must include an override of this abstract method.




PreviousNext

Related