
Java – Sorting list of objects on multiple fields using Comparator
In one of the previous articles, we have discussed how to sort list of objects on the basis of single field/attribute using Comparable and Comparator interfaces Read More
In one of the previous articles, we have discussed how to sort list of objects on the basis of single field/attribute using Comparable and Comparator interfaces Read More
In this article, we will discuss how to convert Ordered ArrayList into Sorted TreeSet in Java We can sort ArrayList in both ascending and descending Read More
In this article, we will discuss how to sort HashSet contents in ascending as well as descending order Sorting HashSet in Ascending and Descending order: Read More
In this article, we will compare 2 important interface in collection framework i.e.; Comparable v/s Comparator Comparable interface Comparator interface Both interface is used to sort Read More
In this article, we will discuss Comparator interface with its methods in detail 1. Comparator interface: Comparator interface is used to order objects This is Read More