title: How do I dump the contents of a hash map?
body: <p>How can I dump the contents of a Java HashMap(or any other), for example to STDOUT ?</p>
  
  <p>As an example, suppose that I have a complex HashMap of the following structure :</p>
  
  <pre><code>( student1 =&gt; Map( name =&gt; Tim,         
                     Scores =&gt; Map( math =&gt; 10,
                                    physics =&gt; 20,
                                    Computers =&gt; 30),
                     place =&gt; Miami,
                     ranking =&gt; Array(2,8,1,13),
                    ),
   student2 =&gt; Map ( 
                     ...............
                     ...............
                   ),
  ............................
  ............................
  );
  </code></pre>
  
  <p>So I would like to print it to the screen in order to get an idea about the data structure.
  I am looking for something similar to PHP's var_dump() or Perl's dumper().</p>