Why should I use a HashSet over a regular ArrayList? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why should I use a HashSet over a regular ArrayList?

7th Aug 2016, 11:32 PM
Marco Neumann
Marco Neumann - avatar
2 Answers
+ 5
the HashSet cannot contain duplicates, while ArrayList can.
8th Aug 2016, 6:41 PM
ingi
+ 1
also hashset used for mathematical set abstraction
15th Nov 2016, 9:29 PM
Abdulwahid Mohammed
Abdulwahid Mohammed - avatar