Apr 29

Sometimes you need to get the currency symbol used for your currency in a different Locale. eg. In the US they use $, but a different Locale may use US$.

The Currency class can be used to not only get the currency symbol for a Locale, but also the currency symbol used for your currency in a different Locale.

Currency currency = Currency.getInstance(myLocale);
String symbol = currency.getSymbol(otherLocale);

written by objects \\ tags: , ,


Leave a Reply

You must be logged in to post a comment.