When I do System.out.println(map) in Java, I get a nice output in stdout. How can I obtain this same string representation of a Map in a variable w
System.out.println(map)
Map
You can also use google-collections (guava) Joiner class if you want to customize the print format