Skip to content

Tag Archives: Java-Collections

The DelayQueue class belongs to java.util.concurrent package. DelayQueue implements the BlockingQueue interface. DelayQueue is a specialized Priority Queue that orders elements supported their delay time.… 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
HashTable class is part of the Collection framework in Java where the only major difference it has from HashMap is that it’s synchronized. Hash table… Read More
Features of TreeSet is the primary concern it is widely used in remove duplicates in the data structure as follows: TreeSet implements the SortedSet interface.… Read More
In order to get the value element of the user-defined object, one needs to implement the sorting logic in TreeSet. Now in order to implement… Read More
Array is contiguous memory allocation while LinkedList is a block of elements randomly placed in the memory which are linked together where a block is… Read More
Java HashSet class is used to create collection to be used by the collection that uses a hash table for storage purposes that uses the… Read More
ArrayList class is a re-sizeable array that is present in java.util package. Unlike the built-in arrays, ArrayList can change their size dynamically where elements can… Read More
Lists in java allow us to maintain an ordered collection of objects. Duplicate elements as well as null elements can also be stored in a… Read More
To get TreeSet Element smaller than Specified Element using floor() Method in Java.The TreeSet is used to store elements in sorted order. The floor method… Read More
HashMap is a non synchronized collection class. If we want to perform thread-safe operations on it then we must have to synchronize it explicitly. In… Read More
LinkedList in java is basically a part of the collection framework present in java.util package. It is the implementation of the LinkedList data structure that… Read More
Any group of individual objects which are represented as a single unit is known as the Collection of the objects. In Java, a separate framework… Read More
The size() and isEmpty() of java.util.Collection interface is used to check the size of collections and if the Collection is empty or not. isEmpty() method… Read More
Shuffling means changing the positions of ArrayList elements randomly. After shuffling, they will be in different order.  Following is the example of Shuffling ArrayList elements.… Read More

Start Your Coding Journey Now!