When you call the overloaded (overloaded) compiler methods:
1) first it looks for a method parameter types that are exactly the same with arguments;
If this method is not found
2) then looks for a method with parameters that can be obtained via a call admissible transformations (widening, boxing + widening, unboxing + widening);
if this method is not found
3) then methods are analyzed with a variable number of arguments.
In this example, the compilation stops at the second step (conversions trigger int → Integer, Integer → int).
Login in to like
Login in to comment