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 the size of int in 64-bit jvm?
What is "this" keyword in java? Explain
How many ways can an argument be passed to a subroutine and explain them?
List the interfaces which extends collection interface?
What is static keyword in java?
What is the use of math abs in java?
What is sizeof in java?
What happens if constructor is private?
Explain abstract class in java?
Using callable statement how can you pass out parameters, explain with example?
Is it possible for yielded thread to get chance for its execution again ?
Can we override the overloaded method?
What is palindrome in java?
does java support pointers?
How many bits is a word?