数字基本类型short、byte、int的赋值与比较
时间:2021-03-10 12:55:56
收藏:0
阅读:0
数字基本数据类型赋值与比较
//byte y = 128;编译错误
byte j = 127;//编译通过
byte x = (byte)(127+1);//编译通过
byte g = 1+1;//编译通过
//byte h = 139+1;编译错误
short i1 = 127;
System.out.println(j==i1); //true
评论(0)