基本数据类型对象包装类

byte Byte

short  short

int  Integer

boolean  Boolean

float    Float

double   Double  

char  Character

 

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

 

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

基本数据类型+””

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

比如:Integer.toString (34); //将34转换成”34“

字符串转成数据类型

xxx a = Xxx.parseXxx (String);

int a = Integer.parseInt(“123”);

double b = Double.parseDouble (“12.12121”); 

 

 

 

 

 

 

 

相关文章:

  • 2022-02-04
  • 2022-12-23
  • 2022-01-13
  • 2021-11-12
  • 2021-05-30
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2021-11-11
相关资源
相似解决方案