Can we declare an anonymous class as both extending a class
and implementing an interface?

Answer Posted / devnaga

No. An anonymous class can extend a class or implement an
interface, but it cannot be declared to do both

Is This Answer Correct ?    26 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are reference variables in java?

810


How to remove the trailing spaces from a string?

877


Why java is made?

749


Differentiate between a class and an object.

778


When throws keyword is used?

750


What are nested classes in java?

808


What is method overloading in JAVA? Why is it not present in C ?

784


Is void a keyword in java?

785


Can you pass by reference in java?

720


What is backdrop?

792


I want to persist data of objects for later use. What’s the best approach to do so?

693


What is math in java?

808


What do you mean by formatting?

729


What is a module function?

777


How do you sing an Applet ?

2227