This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am following K&B book for SCJP preparation. In page 240 of K&B, it is clearly written that Boxing beats var-args, but on same page, there is one line written like this
"A good way to remember this rule is to notice that the var-args method is looser than the other method, in that it could handle invocations with any number of int parameters. A var-arg method is more like a catch-all method in terms of what invocations it can handle."
This means that var-arg methods are more general, because they can be matched to more number of invocations than no-var-arg methods.
This is some analogy to Exceptions (I'm using this example, because of the 'catch-all' statement from the citation you provided). Statment 'catch(Exception e)' will match more exceptions than 'catch(RuntimeException re)'. There is a kind of (general rule for such cases in Java - the more specific pattern is matched first. In case of exceptions for instance you declare catch(RuntimeException re) before catch(Exception e) (within one catch block) - otherwise the compiler will complain, bacause it knows that the catch(Exception e) will 'catch all' exceptions, so catch(RuntimeException re) would never be reached. This way some more specific type of exceptions are handled in a more 'tailored' manner, and all the rest (non-RuntimeException) is taken care of by the more general catch clause ('catch(Exception)'). By analogy in var-arg vs. no-var-arg methods: if no-var-arg method (more specific) can be matched by a given inocation, the compiler will prefer it over a var-arg one. I hope this helps. Regards