title: Printing a java map Map<String, Object> - How?
body: <p>How to I print information from a map that has the object as the value?</p>
  
  <p>I have created the following map:</p>
  
  <pre><code>Map&lt;String, Object&gt; objectSet = new HashMap&lt;&gt;();
  </code></pre>
  
  <p>The object has its own class with its own instance variables</p>
  
  <p>I have already populated the above map with data. </p>
  
  <p>I have created a <code>printMap</code> method, but I can only seem to print the Keys of the map</p>
  
  <p>How to do I get the map to print the <code>&lt;Object&gt;</code> values using a for each loop?</p>
  
  <p>So far, I've got:</p>
  
  <pre><code>for (String keys : objectSet.keySet())
  {
     System.out.println(keys);
  }
  </code></pre>
  
  <p>The above prints out the keys. I want to be able to print out the object variables too.</p>