Finding duplicate values in arraylist

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?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>