print a treemap in java 8 code example
Example: java print treemap
for (Map.Entry<K, V> entry : myMap.entrySet()) {
System.out.println("Key: " + entry.getKey() + ". Value: " + entry.getValue());
}
for (Map.Entry<K, V> entry : myMap.entrySet()) {
System.out.println("Key: " + entry.getKey() + ". Value: " + entry.getValue());
}