请在下面找到示例代码:-
class ExtendMe{
public void printV(int x){
System.out.println(x);
}
}
public class InheritOM extends ExtendMe {
void printV(int y ,int z){
System.out.println("2 arg method called");
System.out.println(y);
System.out.println(z);
}
public static void main(String args []){
InheritOM obj = new InheritOM();
obj.printV(4);
obj.printV(5,6);
}
}
我可以说 printV 方法重载了吗?