class 私有化继承多态 {
public static void main(String[] args) {
F f = new S();
}
}
class F {
int a=1,b=2;
public F(){
System.out.println("haha");
}
{System.out.println(a);}
}
class S extends F {
int a=3,d=4;
String c;
{System.out.println(c);}
public S(){
System.out.println("hei"); }
请问输出结果是什么,还有怎么看哪个先执行,哪个后执行?
|
|