Skip to content

Commit 7a9ddac

Browse files
author
m0a07xh
committed
Map related util methods are written here
1 parent 481bcf1 commit 7a9ddac

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

util/MapUtil.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
/**
66
* Map related util methods are written here
7+
*
78
* @author Manjunath Asundi
89
*/
910
public class MapUtil {
1011

11-
private static void printMap(Map<Object, Object> map) {
12-
for (Map.Entry<Object, Object> data : map.entrySet()) {
13-
System.out.println(data.getKey() + " " + data.getValue());
14-
}
12+
public static void printMap(Map map) {
13+
map.forEach((k, v) -> System.out.println(k + " " + v));
1514
System.out.println();
1615
}
1716
}

0 commit comments

Comments
 (0)