I juste learned JAVA and I have a problem with this code :
HashSet myHashSet = new HashSet();
int[] tab1 = new int[] {0,0};
int[] tab2 = new int[] {0,0};
myHashSet.add(tab1);
myHashSet.add(tab2);
Now my HashSet
contains {{0;0};{0;0}}
! How can I manage simply to not have duplicates in this case?
I thought HashSet
didn't allow duplicates.