title: why using negative int for mod operation in toString method of Integer class in java src
body: <p>when I read the source code of java version 1.7.0_09, I found that the realization of toString method of Integer class uses negative int to calculate the mod operation, is there any sense to that? code is as follows:</p>
  
  <pre><code>public static String toString(int i, int radix) {
  
      if (radix &lt; Character.MIN_RADIX || radix &gt; Character.MAX_RADIX)
          radix = 10;
  
      /* Use the faster version */
      if (radix == 10) {
          return toString(i);
      }
  
      char buf[] = new char[33];
      boolean negative = (i &lt; 0);
      int charPos = 32;
  
      if (!negative) {     
          i = -i;                //***** change i to negative
      }
  
      while (i &lt;= -radix) {
          buf[charPos--] = digits[-(i % radix)];   //***** change back to positive after 
                                                   //***** mod operation
          i = i / radix;
      }
      buf[charPos] = digits[-i];
  
      if (negative) {
          buf[--charPos] = '-';
      }
  
      return new String(buf, charPos, (33 - charPos));
  }
  </code></pre>