public class Main {
/*
百度笔试题
请将10000000000转换为财务计数法
即: 10,000,000,000
*/
public static void main(String[] args) {
String str = "10000000000";
// 正则
// 正则前瞻 零宽断言
str = str.replaceAll("(?=\\B(\\d{3})+$)", ",");
System.out.println(str);
}
}