What is difference between List and Set in Java is a very popular Java interview question.
List vs Set in Java
1.The Fundamental difference between List and Set in Java is that List generally allow duplicate objects where as Set do not allow duplicate objects.
2. List is an Ordered Collection (List maintains insertion order of elements) where as Set is an unordered Collection(Set in Java does not maintain any order)
3.List objects are accessible by index(list.get(index) method can be used ) where as Set obejcts are not accessible by index there is no such method available for set.
4. Implementation of List interface in Java are ArrayList, Vector and LinkedList. While implementation of Set interface in java are HashSet, TreeSet and LinkedHashSet.