阅读:4421 次 编辑日期:2014-06-20
变量类型 | 储存大小 | 举例 | 说明 |
byte | 1byte | 1 | 字节 |
int | 4byte | 2 | 整数 |
short | 2byte | 3 | 短整数 |
long | 8byte | 4 | 长整数 |
float | 4byte | 1.2 | 单精度浮点数 |
double | 8bytes | 1.2 | 双精度浮点数 |
char | 2bytes | 'a' | 字符 |
boolean | 1bit | flase | 布尔值 |
public class uw3c { public static void main(String[] args) { System.out.println("Hi,uw3c!"); int a; a = 8; System.out.println(a); //5 } }