Answer Posted / niranjanravi
An Anonymous class is a class which is defined at run time
without having any name and it is instantiated and declared
at the same place.
Syntax:
new class classname(){}
new interface interfacename(){}
Keyword extends and implements are usedin this class.
It is always implicitly final.
It is never static or final.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Is an object null?
Explain OOPs concept.
How do you declare a string variable?
How does finally block differ from finalize() method?
How to read and write image from a file ?
What is the primitive type short?
When do you get classcastexception?
In case of inheritance what is the execution order of constructor and destructor?
Is singleton class thread safe?
What is a memory leak in java?
Do you need to import math in java?
What is the use of keywords in java?
Can a class have an interface?
Will set allow duplicates in java?
What checkbox method allows you to tell if a checkbox is checked?