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!