以下文字与答案无关
提示:有些试题内容 显示不完整,文字错误 或者 答案显示错误等问题,这是由于我们在扫描录入过程中 机器识别错误导致,人工逐条矫正总有遗漏,所以恳请 广大网友理解。
}
});
}
public void show(Car c){
c.run();
c.show();
}}
abstract class Car{
public void run(){
System.out.println("car run");
}
public void show(){
System.out.println(getClass().getName());
}}
">19.请写出以下程序运行结果:package test;
public class Test {
public static void main(String] args) {
Test t = new Test();
t.show(new Car(){
public void run(){
System.out.println("test run");
}
});
}
public void show(Car c){
c.run();
c.show();
}}
abstract class Car{
public void run(){
System.out.println("car run");
}
public void show(){
System.out.println(getClass().getName());
}}