Q:

Compiler has different output than OCAJP preparation book Overloading methods

I am preparing for the OCA Java SE 7 from a Enthuware question book and I get a different output when I compile in Eclipse running Java 1.7 compiler:
public class TestClass {
    void probe(int x) { System.out.println("In ...");} //1

    void probe(Integer x) { System.out.println("In Integer");} //2

    void probe(long x) { System.out.println("In long");} //3

    void probe(Long x) { System.out.println("In LONG");} //4

    public static void main(String[] args){
        Integer a = 4; new TestClass().probe(a); //5
        int b = 4; new TestClass().probe(b); //6
    }
}

The books output is: 
'In Integer and In long' and 
the output in Eclipse shows 'In Integer and In...'.
Please help me verify which is the correct answer. Thanks!

A:

The output you are seeing is the correct behavior. Overloaded methods are resolved at compile time for the best datatype compatibility. Check with the jdk version for which the book is written for.

