title: How do I override the equals method of an array?
body: <p>A main difference between a Set and a List is that the set admits no duplicates. So instead of <code>List&lt;Integer[]&gt;</code> I am trying to create a <code>Set&lt;Integer[]&gt;</code> such that no two elements are equal. But I am getting the following results when I read <code>Set&lt;Integer[]&gt;</code></p>
  
  <pre><code>[0, 4, 5]
  [3, 4, 1]
  [4, 5, 0]
  [0, 3, 6]
  [1, 3, 4]
  [1, 2, 7]
  </code></pre>
  
  <p>For my implementation, <code>[0, 4, 5]</code> and <code>[4, 5, 0]</code> are considered equal. Hence my question: Is there a way to override the equals method of <code>Integer[]</code> so that the <code>add</code> method of the set function can avoid admitting both <code>[0, 4, 5]</code> and <code>[4, 5, 0]</code>?</p>