Map to String in Java

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2010-05-13T15:55:14Z Indexed on 2010/05/13 16:04 UTC
Read the original article Hit count: 126

Filed under:
|
|

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 without meddling with standard output? Something like String mapAsString = Collections.toString(map)?

© Stack Overflow or respective owner

Related posts about java

Related posts about tostring