I\'d like to use Java\'s DecimalFormat to format doubles like so:
#1 - 100 -> $100 #2 - 100.5 -> $100.50 #3 - 100.41 -> $100.41
Th
Try
new DecimalFormat("'$'0.00");
Edit:
I Tried
DecimalFormat d = new DecimalFormat("'$'0.00"); System.out.println(d.format(100)); System.out.println(d.format(100.5)); System.out.println(d.format(100.41));
and got
$100.00 $100.50 $100.41