Technical Discussion :: Java
Home > Technical Interview Q&A > Java > Discussion
14 / 66
What is the Set interface ?
Answer:
A set is a collection that cannot contain duplicate elements. Set has it's implementation in various classes like HastSet, TreeSet, LinkedHashSet. Set has only methods that are inherited from Collection and adds the restrictions to prohibit duplicate elements.
Asked In ::
Varun Kumar Rai
23 Feb, 2019 5:07 AM
A set is a collection that cannot contain duplicate elements. Set has it's implementation in various classes like HastSet, TreeSet, LinkedHashSet. Set has only methods that are inherited from Collection and adds the restrictions to prohibit duplicate elements.