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

Why chararray() is preferred over string to store the password?

753


Is arraylist zero based?

772


How do you calculate roots in java?

772


What is the difference between the boolean & operator and the && operator in java programming?

768


How many digits can a float hold?

743


hr interview how many minutes asking question

1807


Does java vector allow null?

722


What is difference between string and new string?

746


What are the access modifiers in java?

795


What are multiple inheritances? Is it supported by java?

670


How do you ensure that n threads can access n resources without deadlock?

1077


What is the role of garbage collector in java?

713


Is there a case when finally will not execute?

771


worst case complexities of Quick sort and Merge sort.

791


What does it mean to be immutable?

753