Chapter 16 - Exercise 11

(2) Show that autoboxing doesn’t work with arrays.




public class Exercise11{
    public static void main(String[] args){
        int[] i=new int[]{1,2,3,4,5};
        Integer ii=i;
    }
}



Need Java Developers? Hire Me »

I know Java. Talk is cheap, watch my code.

I live in CANADA now.