【发布时间】:2014-03-27 10:59:52
【问题描述】:
我知道以下方法不起作用,但你能帮我理解为什么吗?
class A {
A(int x) {
System.out.println("apel constructor A");
}
}
class B extends A {
B() {
System.out.println("apel constructor B");
}
}
public class C {
public static void main(String args[]) {
B b = new B();
}
}
【问题讨论】:
-
+1 显然是明确的问题 - 如果只有其他问题也能在短短 9 分钟内获得如此多的关注。 ;)
标签: java inheritance constructor