code: static String formatPriceString(double amount, @NonNull Currency currency) {
          double majorUnitAmount = amount / Math.pow(10, currency.getDefaultFractionDigits());
          NumberFormat currencyFormat = NumberFormat.getCurrencyInstance();
          try {
              DecimalFormatSymbols decimalFormatSymbols = ((java.text.DecimalFormat) currencyFormat)
                      .getDecimalFormatSymbols();
              decimalFormatSymbols.setCurrencySymbol(currency.getSymbol(Locale.getDefault()));
              ((java.text.DecimalFormat) currencyFormat)
                      .setDecimalFormatSymbols(decimalFormatSymbols);
              return currencyFormat.format(majorUnitAmount);
          } catch (ClassCastException e) {
              return currencyFormat.format(majorUnitAmount);
          }
      }
docs: Formats a monetary amount into a human friendly string.