请问JAVA语言中float和double有什么区别呢?它们指的都是小数精确的位数吗?
答案:2 悬赏:30
解决时间 2021-04-07 13:03
- 提问者网友:夕夏残阳落幕
- 2021-04-07 07:45
请问JAVA语言中float和double有什么区别呢?它们指的都是小数精确的位数吗?
最佳答案
- 二级知识专家网友:浪女动了心
- 2021-04-07 07:54
double 双精度 float 单精度
就是double 比 float要精确,占用空间要大
就是double 比 float要精确,占用空间要大
全部回答
- 1楼网友:随心随缘不随便
- 2021-04-07 08:04
i searched the web and here's the result:
float: IEEE 754 floating point, single-precision, 4bytes
double: IEEE 754 floating point, double-precision, 8bytes.
One more thing, when it comes to money, you'd better to use BigDecimal instead.
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯