Object = new Example() { public void display() { System.out.println("Anonymous class overrides the method display()."); } };