explain Anonynous inner class?

Answer Posted / arjun

It is a class without any name. It is used when we want to
have an encapsulation(i.e. want to use an object of a class)
only once and never required again. we combine the object
creation and class code in a interesting way.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an example of a constant variable?

550


Why does java have two ways to create child threads?

476


What must a class do to implement an interface in java programming?

542


What is a 16 bit word?

573


What is getclass () getname () in java?

683






define the terminology association.

631


What is %d in printf?

536


Can we clone singleton class in java?

530


What are the basic concepts of OOPS in java?

579


Where local and global variables are stored?

553


Why inputstreamreader is used in java?

561


Why put method is used?

541


Why do we use variables?

519


What is lastindexof in java?

556


What are java packages?

588