1.java中的常用類(包裝類)有
要注意首字母得大寫!
package Integer;
public class Interger {
public static void main(String[] args) {
Integer a = new Integer(1000);
System.out.println(Integer.MAX_VALUE); //Integer.MAX_VALUE 常量,調用int最大值
System.out.println(Integer.MIN_VALUE); //Integer.MIN_VALUE 同上 也是常量,調用int類型最小值
//將一個對象裝換成一個字符
Integer a1 = Integer.parseInt("123");
System.out.println(a1 +1);
//轉爲一個真正的字符串
System.out.println(a1.intValue());
//數字轉成字符串
String str = 123 + "";
}
}