您的位置:首页 > 其它

基本数据类型对象包装类

2015-01-28 16:48 134 查看
基本数据类型对象包装类

byte Byte

short short

int Integer

long Long

boolean Boolean

float Float

double Double

char Charcter

基本数据类型对象包装类的最常见作用:就是用于基本数据类型和字符串之间的做转换



基本数据类型转成字符串:

基本数据类型类型+“”

基本数据类型.toString(基本数据类型值);

如:Integer.toString(34);

字符串转成基本数据类型:

xxx a=Xxx.parseXxx(String)

int a=Integer.parseInt("111");

double b=Double.parseInt("123");

boolean b=Boolean.parseBoolean("true");
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: