bit byte char short int long float double 汉字的相互关系

本文章借鉴:博客链接

1bit = 1或2 (二进制数)
1byte = 8bit
1char = 1byte = 1字节
1汉字 = 2byte = 2字节
1 short = 2byte = 2字节
1 int = 4byte = 4字节
1 long = 4byte = 4字节
1 float =4byte =4字节
1 double = 8byte = 8字节

猜你喜欢

转载自blog.csdn.net/shaochen2015821426/article/details/79948319