如下定义
public class Outer {
class Inner1 extends Outer {}
class Inner2 extends Inner1 {}
}
==================================================================================================
public class Outer {
class Inner1 {}
class Inner2 extends Inner1 {}
}
先不编译,猜猜看哪个类能编译通过,哪个编译失败?
请编译验证你的预测,并想想看为什么会是这样 |
|