使用Integer a = 1;或Integer a = Integer.valueOf(1); 在值介于-128至127直接时,作为基本类型。 使用Integer a = new Integer(1); 时,无论值是多少,都作为对象。