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
Explain runtime exceptions?
Can a abstract class be defined without any abstract methods?
How do I compare two strings in word in java?
What are the types of casting?
Define inheritance?
What is square root in java?
What is byte data type?
What is meant by method overriding?
What are the basic concepts of OOPS in java?
What is the difference between the file and randomaccessfile classes?
Can we have try block without catch block?
Why parameters should be passed by reference?
Can we use return in constructor?
Explain about the security aspect of java?
How is java hashmap implemented?