- 针对八种基本定义相应的引用类型——封装类
基本数据类型 | 封装类 |
---|---|
boolean | Boolean |
byte | Byte |
short | Short |
int | Integer |
long | Long |
char | Character |
float | Float |
double | Double |
Integer中最常用的方法:
int j = Integer.parseInt("1234");
System.out.println(j + 10); //1244
基本数据类型 | 封装类 |
---|---|
boolean | Boolean |
byte | Byte |
short | Short |
int | Integer |
long | Long |
char | Character |
float | Float |
double | Double |
Integer中最常用的方法:
int j = Integer.parseInt("1234");
System.out.println(j + 10); //1244