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();}