You can use NumberFormat#getCurrencyInstance(Locale)
in order to format currency for BigDecimal
. Here is an example for formatting in USD (Using the US locale):
BigDecimal amount = new BigDecimal("2.5");
NumberFormat formatter = NumberFormat.getCurrencyInstance(Locale.US);
String amountInDollarForm = formatter.format(amount);
System.out.println(amountInDollarForm); // prints $2.50
For more information, pay a visit to the java.text.NumberFormat documentation.