Here you can find the source of numberFormat(int num)
public static String numberFormat(int num)
//package com.java2s; //License from project: Open Source License import java.text.NumberFormat; public class Main { public static String numberFormat(int num) { NumberFormat nf = NumberFormat.getInstance(); return nf.format(num); }//from w ww . jav a2 s . c o m public static String numberFormat(long num) { NumberFormat nf = NumberFormat.getInstance(); return nf.format(num); } }