import java.text.DecimalFormat;//导入包

//保留2位小数
int    scoreAvg = 17.234
DecimalFormat df = new DecimalFormat(".00");
System.out.println(df.format(scoreAvg));

 

相关文章:

  • 2021-11-18
  • 2021-11-18
  • 2022-12-23
  • 2021-10-28
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2022-12-23
相关资源
相似解决方案