I have an ArrayList<Car>

For Example

class Car{
   String carName;
   int carType;
}

Now, I have to find if the list has any cars having same name. What is the best way to do this?

Advertisements