Java - Collection - Set
Set :
- Set is an Interface.
- When we don't want to allow duplicates in collection then we will use set.
- It is also not thread-safe
- If you trying to insert duplicate value, it will not allow, it will just return false.
Types:
- HashSet
- LinkedHashSet
- TreeSet
Comments
Post a Comment