Can you use printf() in Java for a float and not have trailing zeroes, but still have all necessary decimals?

前端 未结 0 862
醉酒成梦
醉酒成梦 2021-01-24 09:19

So if I have the float variable interval and I want to print it, I want it to print with all of the necessary figures and no extra.

If I use System.out

相关标签:
回答
  • 消灭零回复
提交回复
热议问题