Created
August 11, 2015 13:50
-
-
Save jmaciasluque/29c92196ed7ad06b954f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void exercise4() { | |
Map<String, Integer> map = new TreeMap<>(); | |
map.put("c", 3); | |
map.put("b", 2); | |
map.put("a", 1); | |
StringBuilder result = new StringBuilder(); | |
map.entrySet() | |
.forEach(entry -> | |
result.append(entry.getKey()) | |
.append(entry.getValue())); | |
System.out.println(result.toString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment