Java decimal formatting using String.format?

后端 未结 6 706
迷失自我
迷失自我 2020-11-27 03:24

I need to format a decimal value into a string where I always display at lease 2 decimals and at most 4.

So for example

\"34.49596\" would be \"34.4         


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