Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. map.forEach((k, v) -> System.out.println(k + "=" + v));
  2.  
  3. map.compute(minhaChave, (k, v) -> v * v); // Substitui o valor pelo seu quadrado
  4.  
  5. map.computeIfAbsent(minhaChave, (k) -> 42);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement