Did you try reading the DecimalFormat API page?