
Java – Iterate through ArrayList in 5 ways
In this article, we will discuss various ways to iterate through ArrayList – 5 ways Various ways to iterate through ArrayList regular for-loop Enhanced for-loop Read More
In this article, we will discuss various ways to iterate through ArrayList – 5 ways Various ways to iterate through ArrayList regular for-loop Enhanced for-loop Read More
In this article, we will discuss how to create ArrayList using Collections class’s utility nCopies() method This is used to create ArrayList containing multiple copies Read More
In this article, we will discuss how to convert Arrays into List using Arrays class’s utility asList() method 1. Conversion of Arrays to List using Read More
In this article, we will discuss how to search an elements from Arrays using Arrays class’ utility binarySearch() method which uses Binary Search algorithm Cautions: Read More
In this article, we will discuss how to sort Arrays using Arrays class’s utility sort() method Sorting Arrays using Comparable and Comparator : Default Natural Read More
In this article, we will discuss Arrays class – a utility class for Collection framework for inter-conversion between arrays and List, which has useful methods for Read More
In this article, we will learn how to shuffle elements of ArrayList & Arrays using Collections class’ utility method – shuffle() 1. Shuffling elements of Read More
In this article, we will discuss how to copy elements of one List to another List (ArrayList –> ArrayList) using Collections class’s utility copy() method Copying Read More
In this article, we will discuss how to swap elements of List or ArrayList using Collections class’s utility swap() method 1. Swapping 2 elements of Read More
In this article, we will discuss how to get synchronized version of Collection using Collections class’s utility synchronizedCollection() method Q) How to make Synchronized Collection Read More
In this article, we will discuss how to get synchronized version of Map using Collections class’s utility synchronizedMap() method Q) How to make Synchronized Map Read More
In this article, we will discuss how to get synchronized version of Set using Collections class’s utility synchronizedSet() method Q) How to make Synchronized Set Read More
In this article, we will discuss how to get synchronized version of List using Collections class’s utility synchronizedList() method Q) How to make Synchronized List Read More
In this article, we will count of number of duplicate elements present in List using Collections class’s utility frequency() method 1. Count duplicate elements from Read More
In this article, we will discuss how to reverse order of java.util.Comparator using Collections class’ utility reverseOrder() method This is used to get reverse comparator, Read More
In this article, we will discuss how to reverse order of elements in List using Collections class’s utility reverse() method Reversing order of elements of Read More
In this article, we will discuss how to search an elements from List using Collections class’s utility binarySearch() method which uses Binary Search algorithm Cautions: Read More
In this article, we will discuss how to sort elements of List using Collections class’s utility sort() method Sorting ArrayList using Comparable/Comparator interfaces: Default natural Read More
In this article, we will discuss Collections class – a utility class for Collection framework which has useful methods for below operations like, Sorting Searching Reverse the Read More
In this article, we will discuss PriorityQueue class which orders the elements based on some priority 1. PriorityQueue: PriorityQueue is a sub-class of AbstractQueue abstract class Read More