I just found out about a very interesting Java trick:
void method1(Integer... a){
}
So you can give this method as many integers as you want.>
The second method wins. According to the Java Language Specification (pdf),
The first phase (§15.12.2.2) performs overload resolution without permitting boxing or unboxing conversion, or the use of variable arity method invocation.
If an applicable method is found during this stage, that method wins; no further search is performed. In your case, it happens to be the second method, because the first one is a variable arity method that also requires boxing.