title: Hashmap - Key: String, Value: Boolean. How do I test the value within an if statement?
body: <pre><code>/ public void getFinishedBooks(HashMap&lt;String, Boolean&gt; library) {
  
  if (library.size() &lt; 1) {
  
    System.out.println("No books in Library");
  
  } else {
  
    for (String books : library.keySet()) {
  
      **if (library.value == true) {**
  </code></pre>
  
  <hr>
  
  <p>I want the bottom IF statement to run if the Hashmap 'value' of data type Boolean is equal to try. I've tried .get() but that's not working.</p>