How do I format a number in Java? What are the "Best Practices"?
Will I need to round a number before I format it?
32.302342
There are two approaches in the standard library. One is to use java.text.DecimalFormat. The other more cryptic methods (String.format, PrintStream.printf, etc) based around java.util.Formatter should keep C programmers happy(ish).