Here is my method....
void getMerchandise(String category){
for(int i=0; i<merchandise.size(); i++){
if(merchandise.get(i).getCategory()== category)
System.out.println("\n"+merchandise.get(i).toString()+ "\n");
}
Okay, now if I call the method using...
park1.getMerchandise("Hats");
It works just fine and prints all the items with Hats as the category.
However if I do....
String z= input.next();
park1.getMerchandise(z);
and then I type in the word Hats, it gives me nothing. I have another method in which I do the exact same thing, and it works fine. I have the scanner imported, and the scanner is static and is called input. So there are no errors there.