public class MainClass {
public static void main(String[] argv) {
MySubclass my = new MySubclass();
my.calc(1);
my.calc(1.1F);
System.out.println();
}
}
class MyClass {
public void calc(int i) {
System.out.println("public void calc(int i)");
}
}
class MySubclass extends MyClass {
public void calc(int f) {
System.out.println("public void calc(int f)");
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method calc(int) in the type MySubclass is not applicable for the arguments (float)
at MainClass.main(MainClass.java:6)