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 classes of exceptions may be thrown by a throw statement?
What is ide with example?
Can you call a method in a method?
What is math floor in java?
What is difference between == and === in js?
Where we write javascript code in html page?
How do you do descending order in java?
What is the purpose of using javap?
What is a buffer in computer?
Can constructor be static or final?
How would you format a date in java? I.e. In the ddmmyyy format?
Why charat is used in java?
What is the base class for error and exception?
Can substring create new object?
What do you mean by data type?