public abstract class Person { public abstract void show(); public abstract void work(); //int a=1; } public class test { public static void main(String[] args) { new Person() { @Override public void show() { System.out.println("匿名内部类show"); } public void work() { System.out.println("匿名内部类work"); } }.show();; } }