I am novice to java. I have an ArrayList and I want to avoid duplicates on insertion. My ArrayList is
ArrayList
ArrayList karList
You can use LinkedHashSet, to avoid duplicated elements and keep the insertion order.
LinkedHashSet
http://docs.oracle.com/javase/7/docs/api/java/util/LinkedHashSet.html