title: Creating a changing number grid in Java
body: <p>I'll preface this with the fact that this <em>is</em> for homework, so I am just looking for help in which direction to go for solving this problem.</p>
  
  <p>Essentially, I'm supposed to use for-loops to create a number grid that iterates until a max is reached, then wraps around.</p>
  
  <p>Ex:</p>
  
  <pre><code>012345
  123450
  234501
  345012
  450123
  501234
  </code></pre>
  
  <p>I don't know why, but I can't figure this out for the life of me. I'm not allowed to use things like if-statements, so I'm really confused.</p>
  
  <p>My code so far is just the for-loops that iterate but they don't iterate the way they're supposed to:</p>
  
  <pre><code>public static void square(int min, int max) {
      for(int i = min; i &lt;= max; i++){
          System.out.print(i);
          for(int j = min + 1; j &lt;= max; j++){
              System.out.print(j);
          }
  
          System.out.println();
      }
  }
  </code></pre>
  
  <p>Current Output:</p>
  
  <pre><code>012345
  112345
  212345
  312345
  412345
  512345
  </code></pre>
  
  <p>I understand that my code isn't setting the grid up to iterate the way I want it to, I'm just not sure of what direction to go down to fix it. I'm probably overthinking this, but I'm lost. Any ideas?</p>