Possible Duplicate:
SCJP question: Java method overloading with var-args. What is the rationale?
Class Vararg{
static void go(Integer... i){
System.out.println("Wrapper Class");
}
static void go(int... i){
System.out.println("Primitive Type");
}
public static void main(String[] args){
int i =5;
Vararg.go(i);
}
}
Why does the above code doesn't compile? I know there is a vararg hierarchy tie. But why compiler is not able to resolve this kindof tie and execute the above code?