What is the use of anonymous inner classes ?

Answer Posted / sam e

The use of an anonymous inner class is to create a
non-reusable implementation of an abstract class or
interface. For example, a UI button that is Runnable can
implement its run method at the same place in code that it
is created.

Is This Answer Correct ?    20 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a flag and how does it work?

503


How is tree Mirroring implemented?

627


What is the difference between double and float variables in java?

632


What is difference between jdk,jre and jvm?

563


Why string is a class?

544






How does remove work in java?

516


How do you convert an int to a string in java?

539


Explain the difference between string, stringbuffer and stringbuilder in java?

554


Explain list interface?

515


Can a top level class be private or protected?

570


Can we declare the main method of our class as private?

548


What are the differences between path and classpath variables?

486


What is qualitative variable?

520


What is a buffer in java?

571


Can we compare two strings in java?

554