leodaxin

俗话说好记性不如烂笔头,故记之。

 

DecimalFormat decimalFormat = new DecimalFormat("##.00%");
        System.out.println(decimalFormat.format(1 / 3.0));

        System.out.println("=========================================");
        NumberFormat nt = NumberFormat.getPercentInstance();
        nt.setMinimumFractionDigits(2);
        System.out.println("百分数:" + nt.format(1.0 / 3));

 

分类:

技术点:

相关文章:

  • 2021-12-29
  • 2021-11-22
  • 2022-12-23
  • 2022-01-29
  • 2021-10-10
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-02
  • 2022-12-23
  • 2021-09-17
  • 2021-09-17
  • 2021-12-02
  • 2021-09-17
相关资源
相似解决方案