基本数据类型;
4类8种;
整数:byte,short,int,long;
浮点数:float,double.
字符: char;
布尔:boolean;
引用数据类型:
Student s = new Student();
基本数据类型的转换:
自动类型转换:
byte short char ---int--long---float---double
有小到大;
byte b = 10;
int a = b;
强制类型转换;
一般由大到小;
int a = 300;
byte b = (byte)a;//有可能损失精度
算数运算符
++ --;
int a = 10;
a++;
++a;
比较运算符 结果是boolean 类型;