I have this method:
void stuff(Object[] array){
// .. do stuff with the array
}
And trying to do this:
stuff(intArray);
It doesn't compile. I have to manually convert my int[]
to an Integer[]
.
Isn't autoboxing supposed to take care of this stuff for me? Why doesn't it?
Also since turns out the Java language doesn't do this natively, why isn't there a utility in the JDK to do this stuff? Isn't this why we have a standard library?