Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MonetaryAmountFormat germanyFormat = MonetaryFormats.getAmountFormat(Locale.GERMANY);
- System.out.println(germanyFormat.format(Money.of(123.50, "EUR")));
- //Output: 123,50 EUR
- MonetaryAmountFormat italyFormat = MonetaryFormats.getAmountFormat(Locale.ITALY);
- System.out.println(italyFormat.format(Money.of(123.50, "EUR")));
- //Output: EUR 123,50
- MonetaryAmountFormat brazilFormat = MonetaryFormats.getAmountFormat(new Locale("pt", "BR"));
- System.out.println(brazilFormat.format(Money.of(123.50, "BRL")));
- //Output: BRL 123,50
- MonetaryAmountFormat usFormat = MonetaryFormats.getAmountFormat(Locale.US);
- System.out.println(usFormat.format(Money.of(123.50, "USD")));
- //Output: USD123.50
Add Comment
Please, Sign In to add comment