title: How can Boolean/boolean serve as the key of a HashMap in Java?
body: <p>I have an interview question that asks if <code>Boolean</code> can serve as the key of a <code>HashMap</code> in Java. I wasn't sure how this was possible, and would like an explanation.</p>
  
  <p><em>It is also unclear if <code>boolean</code> or <code>Boolean</code> was meant in this question. Perhaps both should be handled in an answer.</em></p>