Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. Map<String, Integer> map1, map2; // populated and not null
  2.  
  3. map1.forEach((k, v) -> map2.merge(k, v, (v1, v2) -> v1 + v2));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement