title: Get values for keys within a range in Java
body: <p>Suppose I have a map in Java which looks like this:</p>
  
  <pre><code>{ 
   39:"39 to 41",
   41:"41 to 43",
   43:"43 to 45",
   45:"&gt;=45"
  }
  </code></pre>
  
  <p>If the keys are in sorted order(either using treemap or linkedhashmap).Now if i try to get a value which is >=39 and &lt;41.Then I should get the String "39 to 41".How do I do this efficiently?</p>