public class Test {
public static void main(String[] args) {
Integer i = new Integer(123);//装箱
int f =i.intValue();//拆箱
System.out.println(f);
System.out.println(i);
float v = i.floatValue();
System.out.println(v);
/* byte Byte;
short Short;
int Integer;
long Long;
float Float;
double Double;
boolean Boolean;
char Character;
八种基本数据类型 八种包装数据类型*/
}
}
Java 八种包装数据类型 装箱 拆箱
Guess you like
Origin blog.csdn.net/qq_45858803/article/details/121480015
Recommended
Ranking