Differentiate between List and Set?
Difference between List and Set in Java
List and Set both are interfaces provides in java.util package
Some of the different between them are
List and Set both are interfaces provides in java.util package
Some of the different between them are
- List is a type of ordered collection that maintains the elements in insertion order while Set is a type of unordered collection so elements are not maintained any order.
- List allows duplicates while Set doesn't allow duplicate elements
Comments
Post a Comment