58

java之二进制与数据类型(二)-樱桃mayue的博客-51CTO博客

 6 years ago
source link: http://blog.51cto.com/13593129/2068182
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
一、各数据类型的最大值和最小值整数:以byte为例,我们知道,byte共有8个bit位,最大值是0111111,最小值是10000000,用十进制来表示就是-128~127,即-2^7~2^7。依照上面的推理方式可知总结下表:数据类型bit位取值范围byte8-2^7~2^7-1short16-2^15~2^15-1int32-2^32~2^32-1long64-2^63~2^63-1小数:我们知

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK