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
Explain the init method?
Mention the default values of all the elements of an array defined as an instance variable.
Write a program to reverse array in place?
What is a type parameter in java?
How can we create a thread in java?
Why is a string immutable?
What is passing parameters in java?
What is runtime locatable code?
What is a substring of a string?
What is skeleton and stub? What is the purpose of those?
In which language java is written?
What do you know about the garbage collector in java?
Explain how to force the garbage collection in java.
Is char a data type in java?
What is byte data type?