Java 8 Tutorial 05 :- How to sort a List in Java 8 using Comparator with Lambda Expression??

preview_player
Показать описание
#Java8 #Java8Tutorials

In this video we will sort a List of integer using Comparator.
As we know Interface Comparator contain only one abstract method Compare.
int compare(T o1, T o2);

So its a Functional Interface and we can write the Lambda Expression for Compare method .

Related Videos:-
Lambda Expression in Detail :-

How to Write Lambda Expression in Java 8 :-

About:-Welcome on Tech Freak .Here you find tutorials on various Technologies like Liferay 6.2 , Liferay 7(DXP) , JUnit ,Java 8 etc.

Please SUBSCRIBE to Tech Freak, Thanks.
Рекомендации по теме
Комментарии
Автор

Good explanation for collections, I think from java 8 we have sort method with list also so we can use that also instead of collections.sort.

satendrashakya