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

Can an integer be null java?

553


Why is the singleton pattern considered to be an anti pattern?

469


Is 64bit faster than 32 bit?

575


How do you declare an empty string?

615


How can we create objects if we make the constructor private ?

537






how to write a server program and sending the mails to the server using smtp protocol please help me

1546


Explain about field hiding in java?

523


What is super keyword explain with example?

527


Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

573


Can a class be private in java?

536


what is heap memory?

654


What is complexity and its types?

520


Why multiple inheritance is not supported by java?

509


Can a class be defined inside an interface?

557


What is broken and continue statement?

530