【简答题】
下列程序运行结果是( ) public class Demo { public static void main(String[] args) { Demo demo = new Demo(); demo.show(new Car() { public void run() { System.out.println("demo run"); } }); } public void show(Car c) { c.run(); } } abstract class Car { public void run() { System.out.println("car run"); } } A. car run B. demo run C. 无结果 D. 程序编译报错
参考答案:
参考解析:
举一反三