title: Android Java percentage calculation
body: <p>I can't figure out what's wrong with this code...
  I'm trying to calculate a percentage:</p>
  
  <p>I'm sure that boath npage and numpages are greater than zero (checked it on the emulator's debug variables inspector), but the resulting cCom is always 0:</p>
  
  <pre><code>Double cCom=(double)(npage/numpages);
  
  tpercent.setText("("+cCom.toString()+"%)");
  </code></pre>
  
  <p>Any ideas?</p>