title: set double format with 2 decimal places
body: <p>I have a short equation:</p>
  
  <pre><code>double compute,computed2;
  
  compute=getminutes/60;
  </code></pre>
  
  <p>where <code>getminutes</code> is <code>int</code> and I want to set the equivalent of <code>compute</code> with 2 decimal places. <code>0.00</code> how can I format the equivalent with 2 decimal places?</p>
  
  <p>Example:</p>
  
  <pre><code>compute=45/60 it should be 0.75 
  </code></pre>
  
  <p>Here is my work: </p>
  
  <pre><code>DecimalFormat df2 = new DecimalFormat("00.00000");
  double computed,computed2 = 00.000;
  
  computed=60/getitbyminutes;
  df2.format(computed);
  computed2=computed-8;
  df2.format(computed2);
  
  System.out.printf("%1$.2f",computed);
  System.out.println();
  System.out.printf("%1$.2f",computed2);
  </code></pre>
  
  <p>the out put will be just like :</p>
  
  <pre><code>1.00
  7.00 
  </code></pre>