java,包装类
package org.hanqi.array; public class BaoZhuang { public static void main(String[] args) { //包装类 Long l=new Long(100); Long l1=new Long("1000"); String str=1000+"";//数值转成字符串 long l2=l1.longValue();//字符串转成数值,从包装类转成基本数据类型 System.out.println("12="+l2); long l3=Long.parseLong("1200");//静态方法从字符串转成long型 //int Integer i=new Integer("100"); Integer.parseInt("100"); //float Float f=new Float("123.45"); Float.parseFloat("123.45"); //double Double d=new Double("12345.67"); Double.parseDouble("123.78"); //boolean Boolean b=new Boolean("aaaa"); System.out.println(b.booleanValue()); } }