What is the use of anonymous inner classes ?
Answer Posted / sumit bansal
Anonymous class exist till the method or block (In which it
is defined) runs. After that it vanishes so it help to use
the memory efficiently.
in your code if you want a particular class once and that
is also in the method/block use anonymous class.
it is the best of my knowledge. if you know more please
reply me.
| Is This Answer Correct ? | 20 Yes | 5 No |
Post New Answer View All Answers
Which is dependent variable?
What is thread pool? How can we create thread pool in java?
What is the difference between compile-time polymorphism and runtime polymorphism?
Is java a super set of javascript?
Can a boolean be null java?
What is collection class in java?
Can we print null in java?
What is a method declaration?
What is final keyword?
What are the drawbacks of singleton class?
What is static block?
What do you mean by light weight and heavy weight components?
What is pre increment and post increment in java?
Can classes declared using the abstract keyword cab be instantiated?
What is included in core java?