Java: Convert scientific notation to regular int

前端 未结 6 442
迷失自我
迷失自我 2020-12-06 10:23

How do I convert scientific notation to regular int For example: 1.23E2 I would like to convert it to 123

Thanks.

6条回答
  •  忘掉有多难
    2020-12-06 10:51

    You can implement your own solution:

    String string = notation.replace(".", "").split("E")[0]
    

提交回复
热议问题