New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Why should I use a HashSet over a regular ArrayList?
2 Answers
+ 5
the HashSet cannot contain duplicates, while ArrayList can.
+ 1
also hashset used for mathematical set abstraction