标签:style static ring 方法 int char boolean pac 装箱
int Integer
char character
byte Byte
short Short
long Long
float Float
double Double
boolean Boolean
public class PackagingClass { public static void main(String[] args) { int num=5; String s=num+" ";//将基本数据类型转换为String System.out.println(s); Integer integer=new Integer(1);//装箱 System.out.println(integer);//重写了toString方法 Integer in = new Integer("1");//装箱 System.out.println(in); Integer int1=Integer.valueOf(16);//装箱 System.out.println(int1); int num1=in;//拆箱 System.out.println(num1); } }
标签:style static ring 方法 int char boolean pac 装箱
原文地址:https://www.cnblogs.com/xzwx668/p/12109906.html