title: Result of x % 10 in Java
body: <p>could anyone tell me what  is the output of (x modulus 10) in java; if x is a positive integer number from 1 (inclusive) to 9 (inclusive) ? I wrote this code to see what it could be but got nothing:</p>
  
  <pre><code>   for(int i=1;i&lt;10;++i)
      {
        int y = (i%10);
        System.out.println("y is:" + y);
       }
  </code></pre>