Hi All,
In the following code,
public class
Test {
public static vois main(
String args[]){
flipFlop("(String, Integer, int)", new Integer(4), 2004); //1
}
private static void flipFlop(String str, int i, Integer iRef) { //2
out.println(str + " ==> (String, int, Integer)");
}
private static void flipFlop(String str, int i, int j) { //3
out.println(str + " ==> (String, int, int)");
}
}
Why is the method call at 1 gives compiler error? Is it not the method at 3 more specific than method at 2 ? I can find the arguments (String str, int i, byte b ) that can be passed to the method at 3 but not for the method at 2 but I cannot find any arguments that are valid for method 2 and not for 3.
regards
praveen