您的位置:首页 > 编程语言 > Java开发

java 数据类型

2016-08-05 18:39 288 查看

Literals

8bit  1byte byte

16bit 2byte short

32bit 4byte int

64bit 8byte long

http://docs.oracle.com/javase/specs/jls/se8/html/jls-4.html#jls-4.2.1
The values of the integral types are integers in the following ranges:

For
byte
, from -128 to 127, inclusive

For
short
, from -32768 to 32767, inclusive

For
int
, from -2147483648 to 2147483647, inclusive

For
long
, from -9223372036854775808 to 9223372036854775807, inclusive

For
char
, from
'\u0000'
to
'\uffff'
inclusive, that is, from 0 to 65535

0x0000 - 0xffff 0-65535

0x0000 - 0xFFFF 0-65535
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: