I have many classes that implement a common interface. I use a definition like Array List mytypes, and add objects of that type to the ArrayList. Now i want to use contains method of the ArrayList class to see if this List contains a class i am adding.
If I implement hashcode and equals on the classes will the contains method know if a certain object already is in the ArrayList or not?
ArrayListimplementation.