title: How to get String key from HashMap?
body: <p>I have a HashMap with String key and String value. I want to get an item from list, I tried to give key and wanted to get value but it gives an error. 
  The following example how can I get "both" value with give the key "blazer"?</p>
  
  <pre><code> HashMap&lt;String,String&gt; upper = new HashMap&lt;&gt;();
   upper.put("shoulder","both");
   upper.put("blazer","both");
  
   if(upper.get(upper.get("blazer"))) {} //gives an "incompatible types" error. 
   //Error: Required: boolean Found: java.lang.String
  </code></pre>