Format currency without currency symbol
I am using NumberFormat.getCurrencyInstance(myLocale) to get a custom currency format for a locale given by me. However, this always includes the currency symbol which I don't want, I just want the proper currency number format for my given locale without the currency symbol. Doing a format.setCurrencySymbol(null) throws an exception.. The following works. It's a bit ugly, but it fulfils the contract: NumberFormat nf = NumberFormat.getCurrencyInstance(); DecimalFormatSymbols decimalFormatSymbols = ((DecimalFormat) nf).getDecimalFormatSymbols(); decimalFormatSymbols.setCurrencySymbol(""); (