About Question enthuware.ocajp.i.v7.2.1058 :
Posted: Fri Oct 19, 2012 12:23 pm
The explanation for this says that if the third test1 method - test1(int i, int j) were removed the the program would not compile because the remaining two methods are equally applicable and equally specific.
On my machine with Java7 installed I get no compile time or runtime errors when I remove the third method with the two int parameters. My machine returns 1 as the output. So it returns the one with the int and the var-args over the method with just var-args.
On my machine with Java7 installed I get no compile time or runtime errors when I remove the third method with the two int parameters. My machine returns 1 as the output. So it returns the one with the int and the var-args over the method with just var-args.