码迷,mamicode.com
首页 > 编程语言 > 详细

java 数据类型

时间:2016-08-05 19:44:41      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:

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

java 数据类型

标签:

原文地址:http://www.cnblogs.com/zno2/p/4629973.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!