int a = 2000;
String str = NumberFormat.getIntegerInstance(Locale.getDefault()).format(a); //转为千分符字符串
System.out.println(str);

try {
int b = NumberFormat.getIntegerInstance(Locale.getDefault()).parse(str).intValue(); //转为数字
System.out.println("" + b);
} catch (ParseException e) {
e.printStackTrace();
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2021-11-07
  • 2022-02-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-18
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案