Nested classes in java
// Anonymous inner class in java
abstract class Anonymous
{
public abstract void display();
}
public class AnonymousInnerExample
{
public static void main(String[] args)
{
Anonymous obj = new Anonymous() {
public void display() {
System.out.println("anonymous inner class example");
}
};
obj.display();
}
}