Java NumberFormat.format(long number)

Syntax

NumberFormat.format(long number) has the following syntax.

public final String format(long number)

Example

In the following code shows how to use NumberFormat.format(long number) method.


/*from w  w  w.  j av a  2 s . c  o m*/
import java.text.NumberFormat;

public class Main {
  public static void main(String[] args) throws Exception {
    NumberFormat numberFormat = NumberFormat.getNumberInstance();
    System.out.println(numberFormat.format(100000000));
    
    
  }
}




















Home »
  Java Tutorial »
    java.text »




DateFormat
DecimalFormat
NumberFormat
SimpleDateFormat