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
What are scriptlets?
What are the two environment variables that must be set in order to run any java programs?
How to sort an unsorted array in java?
What is keyword auto for?
What is javac used for?
Does string is thread-safe in java?
What is a pointer and does java support pointers?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
Explain restrictions on using enum?
What is private static class in java?
How to sort a collection of custom Objects in Java?
Tell me the Importent classes in net package?
What do you mean by singleton class in java?
What are the advantages and disadvantages of reference counting in garbage collection?
What is the java virtual machine?