如下:

public static String getMoneyNumber(double inNumb){
    DecimalFormat decimalFormat = new DecimalFormat("###,###.00");
    return decimalFormat.format(inNumb);
}

举个例子:
String str ="9000000";
BigDecimal b = new BigDecimal(str);
DecimalFormat df = new DecimalFormat("###,###.00"); 
String format = df.format(b);
System.out.println(format);

  

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2021-08-06
  • 2022-12-23
  • 2022-01-20
  • 2021-11-27
猜你喜欢
  • 2021-11-17
  • 2021-08-18
  • 2022-12-23
  • 2022-01-08
  • 2021-06-24
  • 2022-12-23
  • 2022-01-22
相关资源
相似解决方案