title: How to convert int to decimal fraction? - Java
body: <p>I have such code:</p>
  
  <pre><code>int number1 = 20;
  int number2 = number1/100;
  </code></pre>
  
  <p>I want to get percentage of number1 as 0,2 -> I suppose int should be converted into some other type. But I need 0,2 to use for BigDecimal number. How can I get this 0,2 from int number1 = 20? </p>
  
  <p>int number1 = 20 has to be in that type.</p>
  
  <p>Will be grateful for help.</p>