Chandella Montero wrote:Why? I still don't understand.
What happens if you pass an int?
It's a compile error. It's been a little while since I've been through this completely, so double check my explanation.
If you have a a method that takes an Integer... (var args of Integer Objects), passing an int (I believe) is fine since you have wrappers.
If you have a method that takes an int...(primitive var args), passing the primitive is again fine - just a different number of var args.
But if you have both, I believe both are viewed as 'objects' of sorts (Integer Array and int array) and the compiler finds the call ambiguous.