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


Please Help Members By Posting Answers For Below Questions

Why java is not 100% object-oriented?

824


What is a percentage sign called?

615


How we can skip finally block of exception even if some exception occurs in the exception block in java?

516


How do I write a self declaration?

547


What are the differences between abstract class and interface?

506






Can we create object of static class?

524


Have you ever used hashtable and dictionary?

568


Why do we override tostring method in java?

494


What are the types of methods in java?

574


What is a boolean used for?

582


What is difference between string and new string?

530


What is entry in java?

527


Explain the significance of listiterator.

579


What are the string methods in java?

580


What is a void in java?

576