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

worst case complexities of Quick sort and Merge sort.

606


What is locale?

608


Why java applets are more useful for intranets as compared to internet?

580


What is percentage in java?

575


Difference between character constant and string constant in java ?

559






How do you control extraneous variables?

506


What are scriptlets?

599


What is the major difference between linkedlist and arraylist?

511


What is meant by interface?

565


State some situations where exceptions may arise in java?

629


What is array size in java?

500


What is a file pointer?

516


Which of the following is not an isolation level in the JDBC

1612


Can we return null in java?

643


Is array primitive data type in java?

539