Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Map<String, Integer> map1, map2; // populated and not null
- map1.forEach((k, v) -> map2.merge(k, v, (v1, v2) -> v1 + v2));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement