答案解析
class A
{
public void printValue()
{
System.out.print("A");
}
}
class S extends A
{
public void printValue()
{
System.out.print("S");
}
}
public class Test
{
public static void main(String[] args)
{
S s = new S();
s.printValue();
A as = (A)s;
as.printValue();
as = new A();
as.printValue();
}
}