title: How do I access nested HashMaps in Java?
body: <p>I have a HashMap in Java, the contents of which (as you all probably know) can be accessed by</p>
  
  <pre><code>HashMap.get("keyname");
  </code></pre>
  
  <p>If a have a HashMap inside another HashMap i.e. a nested HashMap, how would i access the contents? Can i do this like this, inline:</p>
  
  <pre><code>HashMap.get("keyname").get("nestedkeyname");
  </code></pre>
  
  <p>Thank you.</p>