NumberFormat.format(long number) has the following syntax.
public final String format(long number)
In the following code shows how to use NumberFormat.format(long number) method.
// w ww. jav a2 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)); } }
The code above generates the following result.