title: Help With Java Sudoku Permuter Program using Two Dimensional Array?
body: <p>I have to create a program that displays the 9 rows of a sudoku as 9 9-digit numbers and then prompt the user to do one of 6 operations on the sudoku. Then we have to output the sudoku each time the user performs an operation. This is sort of a sample run of how it should go:</p>
  
  <pre><code>Welcome to Sudoku Permuter.
  
     C C C C C C C C C
     1 2 3 4 5 6 7 8 9
  R1 0 8 0 4 0 2 0 6 0
  R2 0 3 4 0 0 0 9 1 0
  R3 9 6 0 0 0 0 0 8 4
  R4 0 0 0 2 1 6 0 0 0
  R5 2 0 0 0 0 9 6 0 0
  R6 0 1 0 3 5 7 0 0 8
  R7 8 4 0 0 0 0 0 7 5
  R8 0 2 6 0 0 0 1 3 0
  R9 0 9 0 7 0 1 0 4 0
  
  (0 denotes a blank)
  
  Enter 1 to swap two rows in a panel
  Enter 2 to swap two columns in a panel
  Enter 3 to swap two row panels
  Enter 4 to swap two column panels
  Enter 5 to swap two numbers
  Enter 0 to end:
  </code></pre>
  
  <p>Let's say the user enters 3 (to swap two row panels). This would come up:</p>
  
  <pre><code>Enter row panels (1-3) to swap: 3 1
  </code></pre>
  
  <p>It would swap row panels 1 and 3, and this would be the output:</p>
  
  <pre><code>   C C C C C C C C C
     1 2 3 4 5 6 7 8 9
  R1 8 4 0 0 0 0 0 7 5
  R2 0 2 6 0 0 0 1 3 0
  R3 0 9 0 7 0 1 0 4 0
  R4 0 0 0 2 1 6 0 0 0
  R5 2 0 0 0 0 9 6 0 0
  R6 0 1 0 3 5 7 0 0 8
  R7 0 8 0 4 0 2 0 6 0
  R8 0 3 4 0 0 0 9 1 0
  R9 9 6 0 0 0 0 0 8 4
  
  Rows 1-3 have been switched with rows 7-9.
  </code></pre>
  
  <p>Let's say the user inputs 5. This comes up:</p>
  
  <pre><code>Enter two numbers: 2 8
  </code></pre>
  
  <p>The original sudoku is outputted again, except 2's and 8's are switched throughout.</p>
  
  <pre><code>   C C C C C C C C C
     1 2 3 4 5 6 7 8 9
  R1 0 2 0 4 0 8 0 6 0
  R2 0 3 4 0 0 0 9 1 0
  R3 9 6 0 0 0 0 0 2 4
  R4 0 0 0 8 1 6 0 0 0
  R5 8 0 0 0 0 9 6 0 0
  R6 0 1 0 3 5 7 0 0 2
  R7 2 4 0 0 0 0 0 7 5
  R8 0 8 6 0 0 0 1 3 0
  R9 0 9 0 7 0 1 0 4 0
  </code></pre>
  
  <p>If the user entered 1, something would come up saying</p>
  
  <pre><code>Enter two rows (1-9) to switch:
  </code></pre>
  
  <p>And whichever rows the user enters, those two individual rows would be swapped and the sudoku would once again be outputted. It'd be similar if the user entered 2, except 2 columns would be switched. Similarly, if the user entered 4, two column panels would be switched.</p>
  
  <p>We're supposed to use a two dimensional array like this:</p>
  
  <pre><code>int [] [] sudoku = new int[10] [10]
  </code></pre>
  
  <p>I have no idea how to do this. I've been struggling all semester, this is my first programming class. I just don't understand arrays at all, and I don't understand how we're even supposed to display the sudoku in the first place. This problem isn't in our book, so I have nothing to look back on, either. I really need to pass this class. If anyone could help me, I really appreciate it. Try to make it easy to understand, there's a lot of stuff I haven't learned how to do yet (ex: for the record, idk what parseInt is). I've tried reading the book (several times). It helps some, but this program is going to be impossible. Thank you SO much for the help.</p>