title: check if elements of one ArrayList are present in other
body: <p>I have two arraylist</p>
  
  <pre><code>ArrayList&lt;String&gt; a1
  ArrayList&lt;String&gt; a2
  </code></pre>
  
  <p>I want to check if all the elements of a1 are present in a2.
  this is what I was trying which I got from a question on SO</p>
  
  <pre><code>if (Arrays.asList(a2).containsAll(Arrays.asList(a1)))
  {a2ContainsA1=true;}
  </code></pre>
  
  <p>which is not giving consistent results...is there any other way of doing this? </p>