Here you can find the source of formatLong(long value)
public static String formatLong(long value)
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; import java.text.NumberFormat; public class Main { public static String formatLong(long value) { NumberFormat formatter = new DecimalFormat("#,###,###"); return formatter.format(value); }/*from w w w.j a v a2 s . com*/ }