title: Deep cloning multidimensional arrays in Java...?
body: <p>I have two multidimensional arrays (well actually they're only 2D) which have inferred size. How do I deep clone them? Here's what I have gotten so far:</p>
  
  <pre><code>public foo(Character[][] original){
      clone = new Character[original.length][];
      for(int i = 0; i &lt; original.length; i++)
            clone[i] = (Character[]) original[i].clone();
  }
  </code></pre>
  
  <p>A test for equality <code>original.equals(clone);</code> spits out a false. Why? :|</p>