JAVASE基础
两大数据类型:
八大基本数据类型:
int byte short long
1 2 4 8
8位 16位 32位 64位
int (-2ⁿ-¹)~(2ⁿ-¹)-1 n为位数
-128~127
byte (-2ⁿ-¹)~(2ⁿ-¹)-1
short long同上
boolean 1字节 8位 true/false
char 2字节 16位 "a"
float 4字节 32位 单精度
double 8字节 64位 双精度
引用数据类型:接口(interface)
类(class)
数组([])