Java keep trailing 0 in float operations

前端 未结 3 1413
南方客
南方客 2021-01-28 03:56

the code:

Float f = Float.parseFloat(\"1.80\");
System.out.println(f);

prints \"1.8\" on screen. I need to keep the 0 in the float

3条回答
提交回复
热议问题