title: Java ArrayList - how can I tell if two lists are equal, order not mattering?
body: <p>I have two <code>ArrayList</code>s of type <code>Answer</code> (self-made class). </p>
  
  <p>I'd like to compare the two lists to see if they contain the same contents, but without order mattering.</p>
  
  <p>Example:</p>
  
  <pre><code>//These should be equal.
  ArrayList&lt;String&gt; listA = {"a", "b", "c"}
  ArrayList&lt;String&gt; listB = {"b", "c", "a"}
  </code></pre>
  
  <p><code>List.equals</code> states that two lists are equal if they contain the same size, contents, and order of elements. I want the same thing, but without order mattering.</p>
  
  <p>Is there a simple way to do this? Or will I need to do a nested for loop, and manually check each index of both lists?</p>
  
  <p>Note: I can't change them from <code>ArrayList</code> to another type of list, they need to remain that.</p>