ExtendDemo.java
class Fu{
Fu(){
super();
show();
return;
}
void show(){
System. out.println("fu show" );
}
}
class Zi extends Fu{
int num = 8;
Zi(){
super();
return;
}
void show(){
System. out.println("zi show..." + num);
}
}
class ExtendDemo{
public static void main(String[] args){
Zi z = new Zi();
z.show();
}
}
这个程序的运行顺序是怎么走的???求解 |