Basic and Advance Java Question:

Can an anonymous class be declared as implementing an interface and extending a class in Java Programming?

Java Interview Question
Java Interview Question

Answer:

An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.


Previous QuestionNext Question
How can you write a loop indefinitely in Java Programming?What is the purpose of finalization in Java Programming?