what is the difference between a collection and set give reason to support your answer
Answers
Answered by
1
Answer:
collection is a group of things which is collected like a collection of tickets.
set means a group of something like set of books
Answered by
0
The practical difference is that Set enforces the set logic, i.e. no duplicates and unordered, while Collection does not. So if you need a Collection and you have no particular requirement for avoiding duplicates then use a Collection. If you have the requirement for Set then use Set. Generally use the highest interface possibble
Similar questions