标题: 关于重载 [打印本页] 作者: 大梅 时间: 2011-12-20 12:18 标题: 关于重载 class Father{
public Father(){}
public void print(){
System.out.println("I`m father");
}
}
class Son extends Father
{
public Son(String name,int age){
System.out.println(name+" "+age);
}
public void print(String s){
System.out.println(s);
}
}