Basic and Advance Java Question:
Download Questions PDF

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

Answer:

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

Download Java Interview Questions And Answers PDF

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