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

In java how do we copy objects?

543


Can we override constructors in java?

668


What is stack class in java?

534


What are the different http methods?

519


Explain the scope of a variable.

620






Can a static class have a constructor java?

534


What is meant by local variable and instance variable?

589


Which collection is best for sorting in java?

685


What is main string [] args?

515


What is the program compilation process?

574


What is the core java?

532


How to handle a web browser resize operation?

531


Is java 1.7 the same as java 7?

521


Can we have any other return type than void for main method?

529


Why is stringbuffer not immutable?

551