Which of the following can NOT be done in enum?

  1. Declare fields
  2. Create abstract methods
  3. Use anonymous classes
  4. Inherit another class
Correct answer Inherit another class

Explanation

Enums can't inherit other classes except `java.lang.Enum`.

Update: Dhruva Jagannath added a tag on this question

Topics

By Dhruva Jagannath · · 33 views