java基本语句

java基本语句

 

整形    :    byte(1) short(2) int(4) long(8)
浮点型    :     float(4)  double(8)  
字符型    :     char(2)

布尔类型:     boolean(1)(1/8)

 

公式: byte , short , char --> int --> long --> float --> double

隐式转换  →   int=byte+byte          int=byte+short          long=int+long