Multiple choice

Which is true from the following statements?

i. An enumeration can inherit another class. ii. An enumeration cannot inherit another class. iii.An enum can be a superclass. iv. An enum can never be a superclass.

  1. i. and iii. are true

  2. i. and iv. are true

  3. ii. and iii. are true

  4. ii. and iv. are true

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

This answer is correct. An enumeration cannot inherit any other class. The enum cannot be extended, and no other class can inherit enum class. In other words, enum can never be a super class.