title: Java putting Hashmap into Treemap
body: <p>I am currently reading 2 million lines from a textfile as asked in the previous question
  <a href="https://stackoverflow.com/questions/19486077/java-fastest-way-to-read-through-text-file-with-2-million-lines">Java Fastest way to read through text file with 2 million lines</a></p>
  
  <p>Now I store these information into HashMap and I want to sort it via TreeMap because I want to use ceilingkey. Is the following method correct?</p>
  
  <pre><code>private HashMap&lt;Integer, String&gt; hMap = new HashMap();
  
  private TreeMap&lt;Integer, String&gt; tMap = new TreeMap&lt;Integer, String&gt;(hMap);
  </code></pre>