Sort Map based on Values With Custom Objects in Java || Sort map based on Values

preview_player
Показать описание
#kkjavatutorials #Java

About this Video:
Hello Friends,
In this video,we will talk and learn about How to Write a Java program for Sort Map based on Values (Custom Objects)instead Keys

Source code LINK:

Follow me on Social network:

KK JavaTutorials WebSite:

Subscribe KK JavaTutorials YouTube Channel:

Subscribe My Hindi Channel(KK HindiGyan):

Some Important Playlist link on KK JavaTutorials:

Spring Framework Tutorial:

Eclipse shortcuts :

Java 8 Features Tutorial(All In One):

JDBC Tutorial in depth[Must Watch]

Java 8 Stream APIs:

WebLogic Server Tutorials:

Spring Boot Tutorial(All In One):

Hibernate Tutorials:

Java 5 new features Tutorials

Java 7 Features tutorials:

Java multithreading for beginners:

Java Collections framework Tutorials:

OOPs concepts in java Tutorials:

Design Pattern Tutorials:

Git & GitHub Tutorials:

Git & GitHub Interview Questions:
Рекомендации по теме
Комментарии
Автор

Thanks. Please put more core java video with real time

Saravanan-ljso
Автор

okay, thanks but i thought you are going to transform the List<Entry<Integer, Employee>> back to the original typed Map, being Map<Integer, Employee>. Instead you printed each Entry of the list. But I guess it's just the last step which is "missing" so instead printing you would have to do:

list.forEach(entry->{
sortedMap.put(entry.getKey(), entry.getValue());
});

JmMazTaRY
Автор

How to write entry set return type automatically.. please explain

rajashekarreddy
Автор

How can we handle null and "" ???

ajazshaik
Автор

Your original map(originalIdandNameMap) which is supposed to get sorted is still intact as you just pulled out a list of entry object from the original map and then did the sorting. I am bit upset to see this approach.

vaibhavsrivastava