package base;
public class Zhuang {
public static void main(String args[]){
System.out.println(Integer.MAX_VALUE);//int 最大值
System.out.println(Integer.MIN_VALUE);//int 最小值
System.out.println(Integer.SIZE);//数值长度
Integer d=Integer.valueOf(16);//装箱
System.out.println(d);
int b = d.intValue();//拆箱
System.out.println(b);
Integer c= 15;//自动装箱
int e= c;//自动拆箱
System.out.println(e);
int a= Integer.parseInt("1");//字符串 转int类型 里面只能是数字
double j=Double.parseDouble("10.2");//字符串 转double 类型
System.out.println(a);
System.out.println(j);
int k=100;
String l= 100+"";//方式1
System.out.println(l+l.length());
//任何数据类型加上+""都是字符串类型
String h=String.valueOf(k);
System.out.println(h+h.length());//方式二
}
}
public class Zhuang {
public static void main(String args[]){
System.out.println(Integer.MAX_VALUE);//int 最大值
System.out.println(Integer.MIN_VALUE);//int 最小值
System.out.println(Integer.SIZE);//数值长度
Integer d=Integer.valueOf(16);//装箱
System.out.println(d);
int b = d.intValue();//拆箱
System.out.println(b);
Integer c= 15;//自动装箱
int e= c;//自动拆箱
System.out.println(e);
int a= Integer.parseInt("1");//字符串 转int类型 里面只能是数字
double j=Double.parseDouble("10.2");//字符串 转double 类型
System.out.println(a);
System.out.println(j);
int k=100;
String l= 100+"";//方式1
System.out.println(l+l.length());
//任何数据类型加上+""都是字符串类型
String h=String.valueOf(k);
System.out.println(h+h.length());//方式二
}
}