ignoreCase() is not a function that I am aware of. Because your original answers you are looking for or lowercase, converting to lower case makes case a non-issue during your contains method. Is there any reason you will need the string in any other case?
Sorry, I meant isnt there a way to make the program ignore the case of whatever the user enters, in order to match it with the correct answer? Like lets say the correct answer, to match with is, hello, but for some reason the user enters HELLO or Hello.
Converting everything to lower case like he showed you did that. That is what I was trying to explain.
There's an equalsIgnoreCase isn't there? I haven't done Java in like 3 years but I want to help. />/> Why not just put the ingredients into a string array then loop through to check the user inputs, that way you don't have to delimit and whatnot?
That is another good idea! Thanks
Combined with the other suggestions in this thread that will work. If you were trying to use the contains method as you were earlier, it does not have the same possibility, so this is likely why it wasn't brought up earlier. I personally would probably use g00se's suggestion, which would also lend itself more easily to converting the input to lowercase.