15:下列程序的运行结果是:( )
class Fu
{
public void show()
{
System.out.println("fu show");
}
}
class Zi extends Fu
{
public void show()
{
System.out.println("zi show");
}
public void method()
{
System.out.println("zi method");
}
}
class Test
{
public static void main(String[] args)
{
Fu f = new Zi();
f.method();
}
}
A:fu show
B:zi show
C:编译报错
D:zi method
|
|