Write 2 difference between collection and set
Answers
Answered by
1
Step-by-step explanation:
Set guarantees that the collection will contain unique elements (no duplicates). A Collection does not guarantee this. The Set interface contains only methods inherited from Collection and adds the restriction that duplicate elements are prohibited. ... Two Set instances are equal if they contain the same elements.
Similar questions
Science,
5 months ago
English,
5 months ago
Social Sciences,
5 months ago
English,
10 months ago
Chemistry,
1 year ago