How can I dump the contents of a Java HashMap(or any other), for example to STDOUT ?
As an example, suppose that I have a complex HashMap of the following structure
Use HashMap.toString() (docs here):
HashMap.toString()
System.out.println("HASH MAP DUMP: " + myHashMap.toString());
Generally, use Object.toString() to dump data like this.
Object.toString()