Convert a number to 2 decimal places in Java

前端 未结 4 1787
孤街浪徒
孤街浪徒 2020-12-01 15:31

I want to convert a number to a 2 decimal places (Always show two decimal places) in runtime. I tried some code but it only does, as shown below

 20.03034 &g         


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