Skip to content

Tag Archives: Java-Collections

The reverseOrder() method of Collections class that in itself is present inside java.util package returns a comparator and using this comparator we can order the… Read More
shuffle() method of Collections class as the class name suggests is present in utility package known as java.util that shuffles the elements in the list.… Read More
Following methods can be used for converting ArrayList to Array:  Method 1: Using Object[] toArray() method Syntax:   public Object[] toArray()   It is specified by… Read More
java.util.Collections.swap() method is a java.util.Collections class method. It swaps elements at the specified positions in given list. // Swaps elements at positions "i" and "j"… Read More
reverse() method of Collections class as the name itself suggests is used for reversing elements been there up in the object in which they are… Read More
Deque interface present in java.util package is a subtype of the queue interface. The Deque is related to the double-ended queue that supports the addition… Read More
java.util.Collections.binarySearch() method is a java.util.Collections class method that returns position of an object in a sorted list.  // Returns index of key in sorted list… Read More
  java.util.Collections.sort() method is present in java.util.Collections class. It is used to sort the elements present in the specified list of Collection in ascending order.… Read More
The NavigableMap interface is a member of the Java Collection Framework. It belongs to java.util package and It is an extension of SortedMap which provides… Read More
NavigableSet represents a navigable set in Java Collection Framework. The NavigableSet interface inherits from the SortedSet interface. It behaves like a SortedSet with the exception… Read More
SortedMap is an interface in the collection framework. This interface extends the Map interface and provides a total ordering of its elements (elements can be… Read More
The map interface is present in java.util package represents a mapping between a key and a value. The Map interface is not a subtype of… Read More
The SortedSet interface present in java.util package extends the Set interface present in the collection framework. It is an interface that implements the mathematical set.… Read More
ArrayList is a part of collection framework and is present in java.util package. It provides us with dynamic arrays in Java. Though, it may be… 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

Start Your Coding Journey Now!