Possible Duplicate:
How to round a number to n decimal places in Java
I am trying to format a string that is used as currency to two decimal places. For example, if they enter 100, it will format it to 100.00, and if they enter 100.5, it will be formatted to 100.50. What would be the best way to go about this?