Format a BigDecimal as String with max 2 decimal digits, removing 0 on decimal part

后端 未结 5 560
情歌与酒
情歌与酒 2020-11-29 00:24

I have a BigDecimal number and i consider only 2 decimal places of it so i truncate it using:

bd = bd.setScale(2, BigDecimal.ROUND_DOWN)

No

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