class TestA {
public void start() { System.out.println("TestA"); }
}
public class TestB extends TestA {
public void start() { System.out.println("TestB"); }
public static v.id main(string[] args) (
((TestA)new TestB()).start();
}
}
运行结果是哪项?
A. TeStA
B. TeStB
c.编译失败
D.运行时抛出异常 |
|