I am trying to display the elements of my `ArrayList<LibraryItem>` in an action listener method by calling a `printlibrary` method from another class. I keep getting:

`The method printLibrary(ArrayList<LibraryItem>) in the type Library is not applicable for the arguments.`

I don't understand what I am doing wrong could you please help me. 

```
import java.util.ArrayList;

public class Library {

    private ArrayList<LibraryItem> items;

    public Library() {
        items = new ArrayList<LibraryItem>();
    }

    public void addItem(LibraryItem newItem) {
        items.add(newItem);
    }

    public LibraryItem searchForItem (String name) {
        for(LibraryItem searchForItem: items) {
            if(searchForItem.getName().equals(name))
                return searchForItem;
        }
        return null;
    }

    public static void printLibrary(ArrayList<LibraryItem> items) {
        for(int i = 0; i < items.size(); i++) {
            System.out.println(items.get(i));
        }
    }
}

public void actionPerformed(ActionEvent ev) {
    String t = title.getText();     
    int y = Integer.parseInt(year.getText());
    int q = Integer.parseInt(quantity.getText());

    library.addItem(new LibraryItem(t,y,q)); 

    library.printLibrary(); -------->>>> ERROR HERE!!!
}                                                                                                     this is the edited version and the error                                               public void printLibrary(ArrayList<LibraryItem> items) {
        for(int i = 0; i < items.size(); i++) {
            System.out.println(items.get(i));
        }
    }
}      public void actionPerformed(ActionEvent ev) {
    String t = title.getText();     
    int y = Integer.parseInt(year.getText());
    int q = Integer.parseInt(quantity.getText());

    library.addItem(new LibraryItem(t,y,q)); 

    library.printLibrary(); 
}                                                                                              this is my code for libraryitem class `                                                                public class LibraryItem 

```

{

```
    private String name;
    private int year, quantity;

   LibraryItem(String nameIn, int yearIn, int quantityIn)
   {
       name = nameIn;
       year = yearIn;
       quantity = quantityIn;

   }

public boolean rent()
{

    if(quantity > 0) 

    {
         quantity--;

    }
      return true;
}

    public String toString()
   {
return name + " " +"has"+ " " +quantity+ "books on loan";

   }

    public String getName()
   {
return name;

   }

   public int getQuantity()
   {

   return quantity;
   }

   public int getYear()
   {

   return year;
   }

   }

```

`

this is my code for library ` import java.util.ArrayList;

```
 public class Library {

private ArrayList<LibraryItem> items;

public Library()
{
    items = new ArrayList<LibraryItem>();
}

public void addItem(LibraryItem newItem)
{
    items.add(newItem);

}

public LibraryItem searchForItem (String name)

{
    for(LibraryItem searchForItem: items)
    {
        if(searchForItem.getName().equals(name) )

    return searchForItem;

}
    return null;
}

public void printLibrary()
{

    for(int i = 0; i< items.size(); i++)
    {

        System.out.println(items.get(i));
    }

}

```

}

```
                                   `                                                                                                                                           

```