List
|
Set
|
1. List allows duplicate elements.
|
Set doesn’t allow duplicates.
|
2. List allows any number of null values.
|
Set allows single null value at most.
|
3. List is an ordered collection. it maintains
Insertion order or element.
|
Set doesn’t maintain any order.
Set is an unordered collection. You get no guarantee on which order element will be stored.
|
No comments:
Post a Comment