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
what is encapsulation in java? Explain
What is arraylist class in java?
How do generics work in java?
What is OOP's Terms with explanation?
What are white spaces in java?
What is integer size in java?
Will minecraft java be discontinued?
What is a method vs function?
What is instance synchronization?
Does java trim remove newline?
What is java and why do we need it? Explain
What is meant by null and void?
What package is math in java?
What is module with example?
what is the difference between preemptive scheduling and time slicing? : Java thread