整数类型boolean(true false)
字符类型int
byte
short
long
浮点类型char
类型转换float(单精度)
double(双精度)
例如
int x=10;
float y;
y=x;
则输出y的结果为50.0
int x=(int)34.89;
则输出x的值为34

整数类型boolean(true false)
字符类型int
byte
short
long
浮点类型char
类型转换float(单精度)
double(双精度)
例如
int x=10;
float y;
y=x;
则输出y的结果为50.0
int x=(int)34.89;
则输出x的值为34