The answer to question 15 in Chapter 2's Self Test (SCJP Study Guide - Sierra & Bates) says:
In general, overloaded var-args methods are chosen last.
OK. Fair enough. I know that now. I'm worried though that there may be some other rules of this type that I've missed out on, because I don't see where they are covered in the book. I've experimented with some code and as far as I can see, when choosing which overloaded method to run, the JVM chooses the method that has parameters the furthest down the inheritence tree first.
With this in mind my questions are:
1. Why are methods with var args as parameters chosen AFTER ones with Object as parameter. I would have thought that for an array of class A, then the method with parameter (A... a2) would be more specific than one with a parameter of (Object 0).
2. Are there any other cases like var-args going last that I need to be aware of?