What is the use of anonymous inner classes ?

Answer Posted / jubin thomas, bhilai(mpccet)

Anonymous class is a class which has no methods defined in
it.
Eg.
class a
{
public void hello();
}
class b
{
a obj = new a();
public void hello()
{
System.out.println("Hello World");
}
}

Is This Answer Correct ?    2 Yes 64 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is casting in java programming?

585


What is the final keyword in java?

556


Which containers use a flowlayout as their default layout in java programming?

515


When do we need to use internal iteration? When do we need to use external iteration?

612


what are the states associated in the thread? : Java thread

593






What is difference between throw and throws ?

604


What is port number in java?

595


What is the null?

541


What is difference between iterator and enumeration in java?

527


What are heterogeneous objects?

569


What is java and their uses?

548


What is currentthread()?

575


What is appletviewer?

574


Describe different states of a thread.

580


What are the rules for naming an array?

527