I have an ArrayList
ArrayList
For Example
class Car{ String carName; int carType; }
Now, I have to find if the
Override equals() and hashCode() methods in your Car class and use a Set implementation such as HashSet instead of ArrayList.
equals()
hashCode()
Car
Set
HashSet