During project development, every developer come across a situation where implementation of sorting becomes mandatory. There are many flavors of sorting. It depends on the scenario which one to implement where. In this article, we have mainly focused on sorting using Java 8. Moreover, we have also provided an example which was being used before the introduction of Java 8. Hence our article is on 'How To Sort the List in Java 8'. There are multiple ways to sort a list of items already available before Java8. Further, Java8 has introduced different ways to make sorting/comparison easy. Let's get into our topic 'How To Sort the List in Java 8'. What all solutions are covered in this article? This article covers the following
Tag: java list sort
How to Sort List by Date in Java 8 ?
Sorting a List by Date sometimes becomes a bit tricky. One of the tricky part is how to handle date format and then perform the sorting. In this article 'How to Sort List by Date in Java 8 ?', we will discuss sorting of three types of Dates. These are java.util.Date, java.time.LocalDate and java.time.LocalDateTime. Further, in order to sort the list, we will use three approaches. Using these approaches, we will utilize the new concepts introduced in Java 8. Moreover, these concepts are Lambda Expressions, Method References and Stream API. Additionally, if you want to know how to sort a general list in Java 8 we have separate article on 'How To Sort the List In Java 8?'. Here we will