首先定义2个方法,1和2 并输出结果!然后在main方法里new 1和2 最后在用2 new a 格式为 A a = new A(); a.test(); //A B b = new A(); b.test(); //A