Here you can find the source of formatInteger(Object obj)
public static String formatInteger(Object obj)
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; public class Main { public static String formatInteger(Object obj) { if (obj == null) { return ""; } else {// w w w .j av a2s. c o m try { Integer ival = (Integer) obj; DecimalFormat intFormat = new DecimalFormat("###,###,###,##0"); return intFormat.format(ival); } catch (Exception e) { return "bad Integer in FormatUtils:" + obj.toString() + " Error:" + e.getMessage(); } } } }