title: Using contains on an ArrayList with integer arrays
body: <p>I have an <code>ArrayList&lt;int[]&gt;</code>, and I add an array to it.</p>
  
  <pre><code>ArrayList&lt;int[]&gt; j = new ArrayList&lt;int[]&gt;();
  int[] w = {1,2};
  j.add(w);
  </code></pre>
  
  <p>Suppose I want to know if <code>j</code> contains an array that has <code>{1,2}</code> in it without using <code>w</code>, since I will be calling it from another class.  So, I create a new array with <code>{1,2}</code> in it...</p>
  
  <pre><code>int[] t = {1,2};
  return j.contains(t);
  </code></pre>
  
  <p>...but this would return false even though <code>w</code> was added to the list, and <code>w</code> contains the exact same array as <code>t</code>.</p>
  
  <p>Is there a way to use contains such that I can just check to see if one of the elements of the <code>ArrayList</code> has the array value <code>{1,2}</code>?</p>