Java tutorial
//package com.java2s; import java.math.BigDecimal; import java.text.NumberFormat; public class Main { public static String setThousandSeparator(long number) { BigDecimal bd = new BigDecimal(number); NumberFormat formatter = NumberFormat.getInstance(); return formatter.format(bd.longValue()); } }