title: Remove ar1[][] from ar2[][][]
body: <p>I'm trying to remove a 2d arraylist from another 3d arraylist.
  I mean, delete all the ar1[][] from ar2[][][]
  I can't understand why my code is not deleting all of them:</p>
  
  <pre><code>    public void removeSame(ArrayList&lt;ArrayList&lt;String&gt;&gt; ar1,ArrayList&lt;ArrayList&lt;ArrayList&lt;String&gt;&gt;&gt; ar3)
      {
          for(int k=0;k&lt;ar3.size();k++)
              for(int j=0;j&lt;ar3.size();j++)
                  if(isSame(ar1,ar3.get(k)))
                  {
                      ar3.remove(k);
                  }
      }
      public boolean isSame(ArrayList&lt;ArrayList&lt;String&gt;&gt; ar1,ArrayList&lt;ArrayList&lt;String&gt;&gt; ar2)
      {
          for(int k=0;k&lt;ar2.size();k++)
              for(int j=0;j&lt;ar2.size();j++)
                  if(!ar1.get(k).get(j).equals(ar2.get(k).get(j)))
                      return false;
          return true;
      }
  </code></pre>