Merging Maps in Java 8 using stream apis | Different ways to merge Maps in Java 7 v/s Java 8

preview_player
Показать описание
This videos helps you understand how to merge HashMap, LinkedhashMap, TreeMap using Java 8 stream apis. Moreover, it depicts the difference in merging two maps in Java 7 and Java 8
Рекомендации по теме
Комментарии
Автор

Hi Vishal, Thanks For the Explanation . Ii was helpful . Can you pls suggest for below scenario as well ?
Map<String, List<String>> soldToaccount = new HashMap<String, List<String>>();
Map<String, List<String>> accountType = new HashMap<String, List<String>>();


In above We have list as values . will wait for the response .
Thanks In advance .

deekshasharma
Автор

Thank you so much for showing all the ways. It would be helpful to explain how v1 and v2 are mapped with txnMap1 and txnMap2. Also I do not understand why the simple stream method needs and txnMap1 as argument for new HashMap(). I am new to functional programming and little explanation would be helpful. Thank you.

senthilrajanr
Автор

Thank you so much. Can we expect more videos?

ChallaRavi
Автор

Hi I have small doubt . Can you clear me ?

redfly
Автор

I have two list . This two list have uniqueid column . I want merge to this employee list and salary list and if this employee list uniqueid is equal to salary list uniqid . Salary list have tote_ amount column I need add this column into employee list otherwise I add totel_amount==0

redfly
welcome to shbcf.ru