标签:OLE rgs 装箱 alt ram ble info java review
、
、
package JavaBasicReview; public class JavaGrammer { public static void main(String[] args) { //Java提供了两种类型系统,基本数据类型、引用数据类型 //基本数据类型:4类8种,每种都有对应的包装类 byte b = 1;new Byte("99"); short s;new Short("88"); int i;new Integer("77"); long l;new Long("66"); double d;new Double("1.2"); float f;new Float("1.2"); boolean bo;new Boolean("true"); char c;new Character(‘a‘); //装箱及自动装箱(以int为例),将int2Integer Integer integer = new Integer(199); integer = 199; //拆箱及自动拆箱,将Integer2int int i1 = integer.intValue(); i1 = integer; //基本数据类型2string String intstr = 199+""; intstr = String.valueOf(199); //string2基本数据类型 int i2 = new Integer("1999"); i2 = Integer.parseInt("199"); } }
标签:OLE rgs 装箱 alt ram ble info java review
原文地址:https://www.cnblogs.com/bajiaotai/p/12896014.html