I need to format the double \"amt\" as a dollar amount println(\"$\" + dollars + \".\" + cents) such that there are two digits after the decimal.
What is the best wa
Use BigDecimal instead of double for currency types. In Java Puzzlers book we see:
System.out.println(2.00 - 1.10);
and you can see it will not be 0.9.
String.format() has patterns for formatting numbers.