package com.micro_night.www;
public class ExtendsClass {
public static void main(String[] args){
Zi z= new Zi();
// Zi z1= new Zi();
// z1.show();
z.show();
System.out.println(z);
}
}
class Fu{
Fu(){
super();
this.show();
System.out.println(this);
return;
}
void show(){
System.out.println("Fu show!");
}
}
class Zi extends Fu{
int num=10;
Zi(){
super();
}
void show(){
System.out.println("Zi show!"+"...."+num);
}
} |
|