title: Why are my nested loops printing an extra space at the end of the loops?
body: <p>For every number I print, I want that many spaces of indent before the number. for some reason after the last number, it prints another line with the next number of spaces.</p>
  
  <pre><code>  userNum  = 3;
  
    for(i=0; i&lt;=userNum; ++i) {
       System.out.println(i);
          for( j=0; j&lt;=i; ++j) {
          System.out.print(" ");  
          }
    }  
  </code></pre>