// 获取百分比,不带小数点
    private String getPercentage(String num, String total){
        NumberFormat numberFormat = NumberFormat.getInstance();
        numberFormat.setMaximumFractionDigits(2);
        return numberFormat.format( (float)Integer.valueOf(num) / (float)Integer.valueOf(total) * 100 );
    }

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2022-03-01
猜你喜欢
  • 2022-12-23
  • 2022-01-31
  • 2021-12-26
  • 2021-12-25
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
相关资源
相似解决方案