Skip to content

Tag Archives: Java-Comparable

Vector is a child interface of collection. If we want to represent a group of the individual objects as a single entity where duplicates are… Read More
Java provides the Comparable interface to sort objects using data members of the class. The Comparable interface contains only one method compareTo() that compares two… Read More
The Vector class in java implements a dynamic array i.e. it can grow and shrink according to the elements that we insert or remove to/from… Read More
TreeSet is an implementation of the SortedSet interface in Java that uses a Tree for storage. The ordering of the elements is maintained by a… Read More
The HashSet class implements the Set interface, backed by a hash table which is actually a HashMap instance. No guarantee is made as to the… Read More
The LinkedHashMap is just like HashMap with an additional feature of maintaining an order of elements inserted into it. Assuming you have gone through LinkedHashMap… Read More
The LinkedHashSet is an ordered version of HashSet that maintains a doubly-linked List across all elements. When the iteration order is needed to be maintained… Read More
The LinkedHashMap is just like HashMap with an additional feature of maintaining an order of elements inserted into it. HashMap never maintained the track and… Read More