title: What is the percent % operator in java?
body: <pre><code>public static int sumDigits (int n) {
    if(n &lt; 10)
      return n;
    else
      return n%10 + sumDigits (n/10);
  }
  </code></pre>
  
  <p>This method is used to calculate the sum of the digits in a number recursively, but I do not understand it? What is the purpose of n%10???</p>