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

Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

573


How many tetrahedral voids are there in bcc?

537


What is constructor and its types?

533


What is a type parameter in java?

523


what do you mean by marker interface in java?

540






What is substring 1 in java?

581


What is the use of set in java?

604


Why java is object oriented?

579


What is the right data type to represent a price in java?

560


what is nested class in java?

597


How to make a read-only class in java?

585


What is difference between ++ I and I ++ in java?

522


A person says that he compiled a java class successfully without even having a main method in it? Is it possible?

577


What is the benefit of singleton pattern?

516


What do you mean by mnemonics?

521