title: nested hashmaps of unknown depth java
body: <p>I have a requirement in which I need to have an nested hashmap. But the depth would be decided at run time.
  E.g. If at runtime, user says 3,
  then my hashmap should be like </p>
  
  <pre><code>HashMap&lt;String, HashMAp&lt;String, HashMap&lt;String, String&gt;&gt;&gt;
  </code></pre>
  
  <p>if he says 4 then</p>
  
  <pre><code>HashMap&lt;String, HashMAp&lt;String, HashMap&lt;String, HashMap&lt;String, String&gt;&gt;&gt;&gt;
  </code></pre>
  
  <p>Is there any way to implement this kind of functionality? Some other API or toolkit??</p>