The Decimal Format class is not very well documented, so I will try and exmplain it with an example. Firstly, you need to import the DecimalFormat class: Code: import java.text.DecimalFormat; Create an instance the format object. This object can be used with doubles, as it uses a decimal. It uses a template String to teach Java how to ouput the objects. I am using this as a standard format of money: Code: DecimalFormat money = new DecimalFormat("$0.00"); Now that you have the money object. (declared either globally or locally) you can now format your objects Note: This example uses only 2 decimal places and a $, but any symbols or length is available. As an example of prniting a double value: Code: double amount = 4.333333333; System.out.println(money.format(amount)); The output is: $4.33 as described by the template, this handles your percision and dollar sign with a single template.