Here you can find the source of getFormattedValue(double argDoubleValue)
Parameter | Description |
---|---|
argDoubleValue | a parameter |
public static String getFormattedValue(double argDoubleValue)
//package com.java2s; import java.math.BigDecimal; import java.text.NumberFormat; import java.util.Locale; public class Main { /**//w w w. ja v a2 s . co m * This method will convert double value into US Locale Currency value in * String * * @param argDoubleValue * @return US Locale String */ public static String getFormattedValue(double argDoubleValue) { BigDecimal empClaims = new BigDecimal(argDoubleValue); NumberFormat numFormat = NumberFormat.getCurrencyInstance(Locale.US); String empFormatted = numFormat.format(empClaims); return empFormatted; } }