Here you can find the source of strToFormatedNumber(String str)
Parameter | Description |
---|---|
str | a parameter |
public static String strToFormatedNumber(String str)
//package com.java2s; import java.text.NumberFormat; public class Main { /**/*from www.j a v a 2 s .co m*/ * strToFormatedNumber * @param str * @return String */ public static String strToFormatedNumber(String str) { long value = Long.parseLong(str); NumberFormat FORMAT = NumberFormat.getInstance(); FORMAT.setGroupingUsed(true); return FORMAT.format(value); } }