Answer Posted / rimjhim
it is a local inner class without any name.
it is instantiated at the time of declaration and must be
extended by a class or implemented by an interface.
new [class name](argument list){anonymous class body};
overridden functions can be declared in this calss and it
can have only one new method inside it.more than one can
not be called anywhere.
using dot operator we can call that new function.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
In a container there are 5 components. I want to display all the component names, how will you do that?
What is treeset in java collection?
Should you use singleton pattern?
do I need to use synchronized on setvalue(int)? : Java thread
Can we declare the static variables and methods in an abstract class?
Can inner class have constructor?
What is function declaration?
How does hashmap work in java ?
What is the meaning of 3 dots in java?
How does arraylist work in java?
How do you create a sop?
How can a gui component handle its own events?
What is off heap memory?
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
what is synchronization and why is it important? : Java thread