Good day, in database there is table with houses for sale records. For each house record there is currency code (in ISO 4217 format) field. Is it possibly to somehow get currenc
You can use Currency class and DecimalFormat class for achieve your requirement. In following example, # represents number and ¤ represents currency symbol, you can find relevant format parameters in java API doc for DecimalFormat class.
Currency currency = Currency.getInstance("USD");
DecimalFormat decimalFormat = new DecimalFormat("#¤");
decimalFormat.setCurrency(currency);
System.out.println(decimalFormat.format(234));