class Fu{
int num = 5;
Fu(){
// System.out.println(num);
this.show(); //0 为啥是0而不是55.
System.out.println(num); //5
}
void show(){
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();
}
}
|
|