title: Formatting a double and not rounding off
body: <p>I need to format (and <em>not</em> round off) a <code>double</code> to 2 decimal places.</p>
  
  <p>I tried with: </p>
  
  <pre><code>String s1 = "10.126";
  Double f1 = Double.parseDouble(s1);
  DecimalFormat df = new DecimalFormat(".00");
  System.out.println("f1"+df.format(f1));
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>10.13
  </code></pre>
  
  <p>But I require the output to be <code>10.12</code></p>