What is the use of anonymous inner classes ?
Answer Posted / bindhu
We can declare an inner class within the body of a method
without naming it. These classes are known as anonymous
inner classes
Very useful for controlled access to the innards
of another class. and useful when we need one instance of a
special class.
| Is This Answer Correct ? | 11 Yes | 6 No |
Post New Answer View All Answers
What is initial size of arraylist in java?
What are the advantages of arraylist over arrays?
Define canvas?
What is boolean law?
What does index mean in java?
What is multi-catch block in java?
Difference between string, string builder, and string buffer?
What ide should I use for java?
Can sleep() method causes another thread to sleep?
What is difference overloading and overriding?
Explain the Propertie sof class?
Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?
Can we define a package statement after the import statement in java?
Can constructor be protected in java?
What is a list in java?