其他分享
首页 > 其他分享> > 九月29号——动手又动脑

九月29号——动手又动脑

作者:互联网

 

 

java中有8种基本数据类型:byte、int、short、long、boolean、char、float、double 对应的类为:Byte、Int、Short、Long、Boolean、Charecter、Float、Double 逻辑型:boolean 文本型:char 整数型:byte、short、int、long 浮点型:float、double byte:    1字节 -128~127 short:   2字节 -2^15~2^15-1 int :      4字节 -2^31~2^31-1 long:    8字节 -2^63~2^63-1 boolean:1字节 true false(java中不能以0或非0代替) float:    4字节 -3.403E38~3.403E38 double:8字节 -1.798E308~- 4.9E324 char:    2字节  ’\u0000‘~‘ ’\uffff ‘(16进制的,换算过来即0~65535) (1字节等于8位) 结论:由基本到复杂。

标签:动脑,字节,int,float,29,long,char,boolean,九月
来源: https://www.cnblogs.com/lkwkk/p/14159136.html