title: Finding duplicate values in arraylist
body: <p>I have an <code>ArrayList&lt;Car&gt;</code> </p>
  
  <p>For Example</p>
  
  <pre><code>class Car{
     String carName;
     int carType;
  }
  </code></pre>
  
  <p>Now, I have to find if the list has any cars having same name. What is the best way to do this?</p>