🎴 Flashcard Mode

JavaScript and Java Programming Quiz

Card1 / 15
Mastered0
Review0
QuestionClick to flip

Which is true about an anonymous inner class?

AnswerClick to flip back
A
It can extend exactly one class or implement exactly one interface.
💡 Explanation:

Anonymous inner classes can either extend one class OR implement one interface, but not both simultaneously. This is a syntax limitation - you cannot write 'new MyClass() implements MyInterface { }' or extend multiple classes.

Change Mode