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 different types of multitasking?
Explain the difference between jdk, jre, and jvm?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
Can a class have a static inner class?
Should a main method be compulsorily declared in all java classes?
What is the difference between yielding and sleeping in java programming?
Is an integer an object?
What is an argument java?
What is difference between throw and throws ?
Is alive in java?
What is java reflection api?
What are some characteristics of interference class?
What is the meaning of flag day?
What is the differences between c++ and java? Explain
How many JVMs can run on a single machine and what is the Just-In-Time(JIT) compiler?