Java-方法的覆写
class parent
{
void print()
{
System.out.println("parent");
}
}
class child extends parent
{
public void print()
{
super.print();
System.out.println("child");
}
}
public class test30 {
public static void main(String args[])
{
new child().print();
}
}