1、boolean :true和false,默认是false
2、byte字节 bits 位 1byte=8bits,最小值-128,最大值127
3、1short = 2byte 1int=4byte long=8byte
4、long定义的数字结尾加L
5、float结尾要加f
6、小数是不精确的
public class hello {
public static void main (String[] args) {
float a= 1.23f;
boolean c=(a==1.23);
System.out.println((double)a);
System.out.println©;
}}
输出结果
1.2300000190734863
false
507

被折叠的 条评论
为什么被折叠?



