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
Why is static used?
Where are local variables stored?
Which language is java?
What are 3 boolean operators?
Why is the singleton pattern considered to be an anti pattern?
How do you add an element to an arraylist in java?
What is serialversionuid?
What is the difference between applet and application?
What is a void in java?
What is a conditional statement explain with example?
How can you add and remove nodes in jtree?
What do you understand by soft reference?
What is get () in java?
What is intern method in java?
Can we override the overloaded method?