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
What is object-oriented paradigm?
how do I create a runnable with inheritance? : Java thread
What is immutable data?
When is an object subject to garbage collection?
Is string is a class in java?
How do you decide when to use arraylist and linkedlist?
How can we create an immutable class in java?
What is the common usage of serialization? What exceptions occur during serialization?
What is scope & storage allocation of static, local and register variables? Explain with an example.
What is the difference between a window and a frame in java programming?
How do you check if a string is lexicographically in java?
What is instance means in java?
Which method must be implemented by all threads?
What are reference variables in java?
When we should use serialization?