Map<String,String> persons = new HashMap<>();
persons.put("aaaa@testing","123456789");
persons.put("bbbb@testing","987654321");
Map<String,UsersDTO> users = new HashMap<>();
users.put("aaaa@testing", UsersDTO1);
users.put("bbbb@testing",UsersDTO2);
//Below one is the my required final map by using above two maps by using java 8 Lambdas
Map<String,UsersDTO> finalMap = new HashMap<>();
finalMap.put("123456789",UsersDTO1);
finalMap.put("987654321",UsersDTO2);
How to make finalMap by using the two maps above? This type of question might be there but I want to give special focus on this so that's why I am posting it. How to make by using the lambda expressions?
<String,String>but then you are putingUserDtos to it?