Technical Discussion :: Java
Home > Freshers > Technical Interview Questions > Java
2. 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 :: Tech Mahindra
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.