Converting string to double always gives me wrong representation

I want to convert this string `"0.00071942446044"` to double by using `Double.parsedouble` method but it always gives this answer `7.1942446044E-4` Is there any idea to convert it to double but keeping the same number as it is in the string?
You seem to think that a double "knows" about a string representation. It doesn't - it's just a value. If you want to format it in a particular way, you need to do so explicitly.

以上就是Converting string to double always gives me wrong representation的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准