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

Answer Posted / imtiyaz

sorry i will take back my words...
as Devnaga said anonymous class will be created by extending
a class or implementing interface.
you can't to do both at a time simply saying

new SomeClass() extends someOther

we can't write in the same way

new SomeClass() implements someOther

we Can't That's it

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the init method?

539


Mention the default values of all the elements of an array defined as an instance variable.

514


Write a program to reverse array in place?

583


What is a type parameter in java?

526


How can we create a thread in java?

583






Why is a string immutable?

539


What is passing parameters in java?

511


What is runtime locatable code?

860


What is a substring of a string?

557


What is skeleton and stub? What is the purpose of those?

538


In which language java is written?

535


What do you know about the garbage collector in java?

570


Explain how to force the garbage collection in java.

528


Is char a data type in java?

539


What is byte data type?

546