title: Java arithmetics for calculating a percentage
body: <p>I have a little problem in my java application.</p>
  
  <p>I have to calculate the score they have when they finish, I use this method:</p>
  
  <pre><code>public Float ScoreProcent(int questions, int correct){
      Float x = new Float(questions);
      Float y = new Float(correct);
  
      Float num = (float) (100 / questions * correct);
      return num;
  }
  </code></pre>
  
  <p>However, when I have 38 questions and 38 are correct it displays 76.</p>