The List interface in Java provides a way to store the ordered collection. It is a child interface of Collection. It is an ordered collection… Read More
Tag Archives: Java-Collections
The LinkedHashMap Class is just like HashMap with an additional feature of maintaining an order of elements inserted into it. HashMap provided the advantage of… Read More
java.util.Arrays.deepToString(Object[]) method is a java.util.Arrays class method. Returns a string representation of the “deep contents” of the specified array. If the array contains other arrays… Read More
java.util.Arrays.fill() method is in java.util.Arrays class. This method assigns the specified data type value to each element of the specified range of the specified array.… Read More
An array is a collection of items stored at contiguous memory locations. The idea is to store multiple items of the same type together. However,… Read More
A Java Cursor is an Iterator, which is used to iterate or traverse or retrieve a Collection or Stream object’s elements one by one. There… Read More
ArrayList is a part of the Java collection framework and it is a class of java.util package. It provides us with dynamic arrays in Java.… Read More
The Queue interface is present in java.util package and extends the Collection interface is used to hold the elements about to be processed in FIFO(First… Read More
The Arrays class in java.util package is a part of the Java Collection Framework. This class provides static methods to dynamically create and access Java… Read More
TreeSet provides an implementation of the SortedSet Interface and SortedSet extends Set Interface. It behaves like simple set with the exception that it stores elements… Read More
A PriorityQueue is used when the objects are supposed to be processed based on the priority. It is known that a Queue follows the First-In-First-Out… 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
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
In C++, we have std::pair in the utility library which is of immense use if we want to keep a pair of values together. We… Read More
‘Iterator’ is an interface which belongs to collection framework. It allows us to traverse the collection, access the data element and remove the data elements… Read More