← Quiz: Java Enums: all 10 questions
Quiz: Java Enums · Question 7 of 10
Can an enum extend another class?
Can an enum extend another class?
- A.Yes, any class
- B.Yes, but only abstract classes
- C.No, it already extends java.lang.Enum; it can implement interfaces instead
- D.No, and it cannot implement interfaces either
Answer & explanation
Correct answer: No, it already extends java.lang.Enum; it can implement interfaces instead
Java allows only one superclass, and for enums that is Enum.
Can you get the rest right without peeking?
Take the timed Quiz: Java Enums quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →