我是一个java新手
Integer[] array={new Integer(20),new Integer(40),new Integer(110)};
Integer[] array={new Integer(20),new Integer(40),new Integer( "110 ")};
为什么上面两句话,Integer(110)和Integer( "110 ")是一样的?
------解决方案--------------------
Integer(int value)
Constructs a newly allocated Integer object that represents the specified int value.
Integer(String s)
Constructs a newly allocated Integer object that represents the int value indicated by the String parameter.
Integer(110)和Integer( "110 ")都是Integer的构造函数.