Difference between list and set in java?
A List is an ordered collection of elements.
A Set is a collection of unique elements.
Sets should be used when you want to store objects without
duplicates. Lists should be used any time you need to store an
unknown number of objects.