Variable Error on getFinishedBooks method

#1 error: cannot find symbol
symbol: variable getFinishedBooks
location: class Library
1 error

import java.util.HashMap;
class Library {
  public Library(){
  public void getFinishedBooks(HashMap<String, Boolean> library){
      System.out.println("Error! HashMap is empty.");
    else {
      for(String book : library.keySet()){
        if (library.get(book) == true){System.out.println(book);
  public static void main(String[] args){
    HashMap<String, Boolean> myBooks = new HashMap<>();
    myBooks.put("Road Down The Funnel", true);
    myBooks.put("Rat: A Biology", false);
    myBooks.put("TimeIn", true);
    myBooks.put("3D Food Printing", false);
    Library myLibrary = new Library();


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.