doudouxiaoye

Java中取两位小数

请参考下面函数:

    private String getFormated(String s){
        float f=Float.parseFloat(s);
        java.text.DecimalFormat   df   =new   java.text.DecimalFormat("#0.00");  
        return df.format(f);
    }

分类:

技术点:

相关文章:

  • 2022-01-19
  • 2021-11-30
  • 2021-12-10
  • 2021-09-15
  • 2022-01-16
  • 2021-12-04
  • 2022-01-28
  • 2021-09-09
猜你喜欢
  • 2021-12-16
  • 2022-12-23
  • 2022-02-12
  • 2022-01-05
  • 2021-12-29
  • 2022-02-09
  • 2022-12-23
相关资源
相似解决方案