4.2.14.Incompatible type for method. Explicit cast needed to convert double to int for parameter passing
public class MainClass { public static void main(String[] argv) { double d = 12.0;
f(d);
}
static void f(int i) {
}
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method f(int) in the type MainClass is not applicable for the arguments (double)
at MainClass.main(MainClass.java:4)