title: Java - How to check if a division is an integer or a float?
body: <p>Couldnt think of a better title.
  Well the problem is:
  I have the "int i", it can be any value. my goal is to transform the "int i" to the closest number divisible by <strong>16</strong>. </p>
  
  <p>For example, I got <strong>i = 33</strong>. Then i will be turned to <strong>32</strong> (16x2).But if I get <strong>i = 50</strong>, then it will be turned to <strong>48</strong> (16x3).</p>
  
  <p>I tried many things for example:</p>
  
  <pre><code>for (int x = i; x &lt; 999; x++){
  if ( (i - x)/16 *is an integer*){
  i = i - x;
  }
  </code></pre>
  
  <p>But I dont know how to check if its an integer. So maybe my previous code work, but I just need to find a way to check if its an integer or a float. So.. any help is appreciated. </p>