Hi here i have the code below to show a number into usd format
Long amount = 1234L;
NumberFormat formatter = NumberFormat.getCurrencyInstance(new Locale("en", "US"));
String moneyString = formatter.format((double) amount / 1000);
System.out.println(moneyString);
I am getting output as $1.23, but i need to show 4 also like $1.234,how to do this
I want my point to 3 decimal and in usd format.
let i am giving a number 150078 i will get o/p as 150.078 please help me.