Collections
-
Java Collections Sort Example
In this example, I will show how to use the java.util.Collections class in order to perform sorting. The Collections class…
Read More » -
java.util.Collections Example
In this article we will discuss about the Collections class and some of its important methods. The class java.util.Collections is a…
Read More » -
Swap List elements example
This is an example of how to swap a List’s elements . We are using the swap(List list, int i,…
Read More » -
Shuffle List elements example
In this example we shall show you how to shuffle a List’s elements. This is provided by the shuffle(List list)…
Read More » -
Reverse order of List example
With this example we are going to demonstrate how to reverse the order of a List. This is provided by…
Read More » -
Replace specific element of List example
This is an example of how to replace a specific element of a List. We will use the replaceAll(List list,…
Read More » -
Replace all elements of List example
In this example we shall show you how to replace all elements of a List. We will use the fill(List…
Read More » -
Binary search List example
With this example we are going to demonstrate how to Binary search a List. We will use the binarySearch(List list,…
Read More » -
Get unmodifiable Collection
This is an example of how to get an unmodifiable Collection. The same API applies to any type of Collection…
Read More » -
Get Synchronized Set example
In this example we shall show you how to get a Synchronized Set. We are using a HashSet, but the…
Read More »
- 1
- 2