Java Locale Format formatInteger(Long num)

Here you can find the source of formatInteger(Long num)

Description

format Integer

License

Open Source License

Declaration

public static String formatInteger(Long num) 

Method Source Code

//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);
    }
}

Related

  1. formatFraction2(final Number value)
  2. formatInCurrentDefaultLocale(double d)
  3. formatingDecimalNumber(Object obj, Locale locale, int maxIntPart, int maxFloatPart)
  4. formatInt(final int number)
  5. formatInteger(int input)
  6. formatIntWithCommas(int num)
  7. formatLines(String target, int maxLength, Locale currentLocale)
  8. formatLocaleDate(final java.util.Date date)
  9. formatLocaleTime(long time, Locale locale)