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 your platform?s default character encoding and how to know this?
Difference between default and protected access specifiers?
What is size () in java?
What are basic keywords?
What are the features of junit?
Give few difference between constructor and method?
What is the difference between an object-oriented programming language and object-based programming language?
What is boolean flag in java?
What data type is a string?
What is downcasting?
What is the difference between interface & abstract class?
When object is created and destroyed?
What are the 3 types of loops in java?
Can we have multiple catch block for a try block?
What are streams?