The following code doesn\'t compile.
package varargspkg;
public class Main {
public static void test(int... i) {
for (int t = 0; t < i.lengt
In Java, 1 is how you represent an int. It can be either auto-boxed to an instance of Integer or promoted to float, and this explains why the compiler can't decide on the method it should call. But it will never be auto-boxed to Long or Float (or any other type).
On the other hand, if you write 1F, it is the representation of a float, that can be auto-boxed to a Float (and, in the same spirit, will never be auto-boxed to an Integer or anything else).