Here you can find the source of formatInteger(Long num)
public static String formatInteger(Long num)
//package com.java2s; /**/*from w w w .j a v a2s . c o m*/ * Copyright (c) 2005, 2013, Werner Keil and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Grahame Grieve - initial API and implementation */ import java.text.NumberFormat; import java.util.Locale; public class Main { public static String formatInteger(Long num) { return NumberFormat.getInstance(Locale.US).format(num.longValue()); } public static String formatInteger(long num) { return NumberFormat.getInstance(Locale.US).format(num); } }