TreeSet Class in Collection

public class TreeSet<E> extends AbstractSet<E> implements NavigableSet<E>, Cloneable, Serializable A NavigableSet implementation based on a TreeMap. The elements are ordered using their natural ordering, or by a Comparator provided at set creation time, depending on …

LinkedHashSet Class in Collection

public class LinkedHashSet<E> extends HashSet<E> implements Set<E>, Cloneable, Serializable Hash table and linked list implementation of the Set interface, with predictable iteration order. This implementation differs from HashSet in that it maintains a doubly-linked list …

HashSet class in collection

A HashSet is a collection set that neither allows duplicate elements nor order or position its elements. This class implements the Set interface and extends AbstractSet. It creates a collection that uses a hash table …

LinkedList class in Collection

LinkedList class extends AbstractSequentialList and implements List, Deque and Queue interface. It can be used as List, stack or Queue as it implements all the related interfaces. It can contain duplicate elements and is not …