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 are controls and their different types in awt?

588


How do I start learning java?

547


What is classpath?

536


Write a program to print fibonacci series up to count 10.

507


Does java allow overriding static methods ?

617






Explain wrapper classes in java?

517


Which data type is class in java?

541


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1588


How many bytes is 255 characters?

539


What is hasnext in java?

568


give an example for encapsulation?

567


What is meant by local variable and instance variable?

585


How does arrays sort work in java?

583


What is isa relationship?

552


Why are pointers not secure?

527