title: Transfer a Two-Dimensional array to Two-Dimensional ArrayList?
body: <p>I have this piece of code:</p>
  
  <pre><code>int[][] pattern = new int[][]{
          { 1, 1, 1, 1, 1, 1, 1 },
          { 1, 2, 0, 0, 0, 2, 1 },
          { 1, 0, 3, 0, 3, 0, 1 },
          { 1, 0, 0, 4, 0, 0, 1 },
          { 1, 0, 3, 0, 3, 0, 1 },
          { 1, 2, 0, 0, 0, 2, 1 },
          { 1, 1, 1, 1, 1, 1, 1 },
  };
  </code></pre>
  
  <p>I need to get this 2d array into a 2d ArrayList so i can manipulate it by adding rows and columns to move the pattern around. For example when my method calls for a shift of 2 rows and 2 columns i will be able to move the pattern to something like this:</p>
  
  <pre><code>        { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
          { 0, 0, 0, 0, 0, 0, 0, 0, 0 }
          { 0, 0, 1, 1, 1, 1, 1, 1, 1 },
          { 0, 0, 1, 2, 0, 0, 0, 2, 1 },
          { 0, 0, 1, 0, 3, 0, 3, 0, 1 },
          { 0, 0, 1, 0, 0, 4, 0, 0, 1 },
          { 0, 0, 1, 0, 3, 0, 3, 0, 1 },
          { 0, 0, 1, 2, 0, 0, 0, 2, 1 },
          { 0, 0, 1, 1, 1, 1, 1, 1, 1 },
  </code></pre>
  
  <p>I'm just looking to get the 2d array into a 2d Arraylist any help will be greatly appreciated! </p>