class MyClass{
static void aut(int i) {}
static void aut(Integer i) {}
static void vararg(int... ia) {}
static void vararg(Integer... ia) {}
public static void main(String args[]) {
aut(1); // compiles successfully
vararg(1); // The method vararg(int[]) is ambiguous for the type MyClass
}
}
I am not able to understand why vararg(1)
is throwing an error.