title: Java map of map (nested map) sorting
body: <p>I have a nested map as </p>
  
  <pre><code>Map&lt;String, HashMap&lt;String, Integer&gt;&gt; map = new TreeMap&lt;String, HashMap&lt;String, Integer&gt;&gt;();
  </code></pre>
  
  <p>Also, I have deep map as</p>
  
  <pre><code>HashMap&lt;String, Integer&gt; deep_map = new HashMap&lt;String, Integer&gt;();
  </code></pre>
  
  <p>I read lines from txt file and put in to nested map as below</p>
  
  <pre><code>try {
      FileInputStream fstream = new FileInputStream("file.txt");
      DataInputStream in = new DataInputStream(fstream);
      BufferedReader br = new BufferedReader(new InputStreamReader(in));
      String strLine;
      while ((strLine = br.readLine()) != null)  {
          String[] tokens = strLine.split(" ");
          deep_map.put(tokens[1], Integer.parseInt(tokens[2]));
          map.put(tokens[0], deep_map);
      }
      in.close();
  } catch (Exception e) {
      System.err.println("Error: " + e.getMessage());
  }
  </code></pre>
  
  <p>Content of txt file like</p>
  
  <pre class="lang-none prettyprint-override"><code>John AA 80
  Adam BB 60
  Natalie BB 65
  </code></pre>
  
  <p>Name is the key of map, grade is the key of nested map and score is the value of nested map.
  Thus, how can I sort them descending order of score?</p>