HashSet and Set
Set is a collection that contains unique items. In this post, we will cover the way to convert a string array to Set<String>. There are 2 approaches to do this requirement. Let’s consider which one we need to use. 1) Using new HashSet<>() HashSet is a mutable collection. That means we can modify the set […]