Skip to content

Tag Archives: Java-Collections

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
ConcurrentHashMap class obeys the same functional specification as HashTable and includes all the versions of methods corresponding to each method of a HashTable. A HashTable… Read More
The Hashtable class implements a hash table, which maps keys to values. Any non-null object can be used as a key or as a value.… Read More
The Vector class is found in java.util package and it implements List interface. The Vector class is included in the java collection framework from Java… Read More
Map Interface is present in Java.util package, which provides mainly three methods KeySet(),entrySet() and values(). These methods are used to retrieve the keys of the… Read More
HashMap<K, V> is a part of Java’s collection since Java 1.2. This class is found in java.util package. It provides the basic implementation of the… 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
In this article, we are going to see how to iterate through a List. In Java, a List is an interface of the Collection framework.… Read More
LinkedBlockingQueue API is an optionally-bounded queue based on linked nodes. It orders the elements in FIFO(First In First Out) order. The head of this queue… Read More
Map Interface is present in Java.util package, which provides mainly three methods KeySet(),entrySet() and values(). These methods are used to retrieve the keys of the… Read More
Enumerations serve the purpose of representing a group of named constants in a programming language. Enums are used when we know all possible values at… Read More
Double hashing is a technique in an open addressing scheme. and there is the ordinary hash function. In an open addressing scheme, the actual hash… Read More
Creating Thread Safe ConcurrentHashSet is not possible before JDK 8 because of the java.util.concurrent package does not have a class called ConcurrentHashSet, but starting with… Read More
Unlike the List classes like ArrayList or a LinkedList, the TreeSet class does not allow accessing elements using the index. There are no direct methods… Read More
Collection.forEach() and Collection.stream().forEach() are used for iterating over the collections, there is no such major difference between the two, as both of them give the… Read More

Start Your Coding Journey Now!