Here you can find the source of formatNumber(long value)
Parameter | Description |
---|---|
value | Integer |
public static String formatNumber(long value)
//package com.java2s; public class Main { /**/* w w w. j ava2 s .c o m*/ * Formats an integer as a string * * @param value * Integer * @return Formatted integer */ public static String formatNumber(long value) { return String.format("%,d", value); } /** * Formats a double as a string * * @param value * Double * @return Formatted double */ public static String formatNumber(double value) { return String.format("%,f", value); } }