package test;
public class Anonymous{
public class Popcorn{
public void pop(){
System.out.println("Popcorn pops");
}
}
public static void main(String args[]){
Popcorn p = new Popcorn(){
public void pop(){
System.out.println("Cooks popcorn");
}
};
p.pop();
}
}