Reverse Order Comparators in Java

In this post, we will cover reverse order comparators provided by JDK and also implement our own reverse order comparators. We will also cover how to handle null values in a Collection.

Sort Map by keys in Java

In this post, we will discuss various methods to sort Map in Java according to the natural ordering of its keys.

Sort List in Ascending Order in Java

In this post, we will discuss several ways to sort List in ascending order in Java. Assume the specified list is modifiable, but not necessarily resizable.

Convert Set to Array in Java

In this post, we will see how to convert set to array in plain Java, Java 8 and with the help of Guava library.

Sort Array in Java

In this article, we will discuss various methods to sort array of primitives types or Objects in Java.

Natural Order Comparators in Java

In this post, we will cover natural order comparators provided by JDK and also write our own natural order comparators. We will also cover how to handle null values in a Collection or array.