Basic and Advance Java Question:

Download Job Interview Questions and Answers PDF

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.

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?