class Fu{
int num = 5;
Fu(){
// System.out.println(num);
show();
System.out.println(num); //为什么结果是0 5
}
不会啊
void show(){ 0
5
System.out.println("55");
}
}
class Zi extends Fu{
int num = 3;
Zi(){}
void show() {
System.out.println(num);
}
}
class Demo3 {
public static void main(String[] args) {
Zi z = new Zi();
//Zi z = (Zi)f;
//f.show();
}
}
|