写出程序结果:
class Fu
{
int num=4;
void show()
{
System.out.println("showFu");
}
}
class Zi extends Fu
{
int num=5;
void show()
{
System.out.println("showZi");
}
}
class T
{
public static void main(String[] args)
{
Fu f=new Zi();
Zi z=new Zi();
System.out.println(f.num);
System.out.println(z.num);
f.show();
z.show();
}
}
|
|