✅ List and Set in Java Collections Framework :
🔅 LIST :
🔸 List in Java provides the facility to maintain the ordered collection.
🔹 It contains the index-based methods to insert, update, delete and search the elements.
🔸 It can have the duplicate elements also.
🔹 We can also store the null elements in the list.
🔅 SET :
🔸 Set interface in Java is present in jave.util package.
🔹It extends the Collection interface.
🔸 It represents the unordered set of elements which doesn't allow us to store the duplicate items.
🔹 We can store at most one null value in Set.
🔸 Set is implemented by HashSet, LinkedHashSet and TreeSet.
Like for more ❤️
Post #499
2.61K
- 👍 2
- ❤ 1