参考这段代码:

    DecimalFormat decimalFormat=new DecimalFormat(".00");
    int i = 100;
    int j = 9;
    float f = (float)i/j;
    String p=decimalFormat.format(f);
    System.out.println(p);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2021-09-09
猜你喜欢
  • 2021-12-31
  • 2022-12-23
  • 2022-01-19
  • 2021-07-28
  • 2021-08-07
  • 2022-12-23
  • 2021-12-07
相关资源
相似解决方案