基本数据类型
数据类型
##基本数据类型 8个
整形 byte < short < int < long
浮点型 foat double
字符型 char
布尔型 boolean
#整形:
byte 1字节型 ----->8个bit 敏感单元位
1byte=8个bit 0 0000000 256种组合
用第一个bit位置来记录符号 0表示正数 1表示负数
数值的范围 -2的7次方 ~2的7次方-1
-128 ~ 127
以上的其他整数类型 依次乘2
short 2字节 16bit -32768 ~ 32767
int 4字节 32bit
#浮点型:
foat 32bit 4字节 double 64bit 8字节
000000000000000000000000
第一个bit表示正负 除去前面一个 后面九个表示整数 其余的表示小数
#字符 :
char 16bit 2字节
#布尔型:
boolean 1bit true false
#引用数据类型
数组[] 类clas(抽象类abstract class)接口interface 枚举enum 注解@interface
本文标题:基本数据类型
本文链接:https://www.haomeiwen.com/subject/kkqcyhtx.html
网友评论