BigDecimal bigDecimal2 = BigDecimal.ZERO.setScale(4, BigDecimal.ROUND_HALF_UP);
        System.out.println(bigDecimal2.toString());//0.0000

        DecimalFormat df2 =new DecimalFormat("0.0000");
        String str2 =df2.format(Double.parseDouble(bigDecimal2.toString()));
        System.out.println(str2);//0.0000

 

相关文章:

  • 2021-11-18
  • 2022-02-08
  • 2021-12-20
  • 2021-11-18
  • 2021-11-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
相关资源
相似解决方案