title: Java copy array 3d by System.arraycopy()
body: <p>How can I copy a 3d array?</p>
  
  <pre><code>int[][][] save = new int[9][9][9];
  
  System.arraycopy(p, 0, save, 0, p.length);
  
  for (int i = 0; i &lt; p.length; i++) {
      System.arraycopy(p[i], 0, save[i], 0, p[i].length);
      for (int j = 0; j &lt; p[i].length; j++) {
          System.arraycopy(p[i][j], 0, save[i][j], 0, p[i][j].length);
      }
  }
  </code></pre>