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 the abstraction?

575


Can you explain inner class.

581


What is java beans?

564


How do you compare objects in java?

490


When will you define a method as static?

540






What is purpose of keyword void?

553


How would you format a date in java? I.e. In the ddmmyyy format?

758


which class is the wait() method defined in? : Java thread

513


What is the size of integer?

578


What is double word?

525


What is the difference between quicksort & mergesort? When should they be used? What is their running time?

645


What are the different types of data structures in java?

482


How do you reverse sort a list in java?

498


What does next mean in java?

525


What is difference between checked and unchecked exception in java?

561