Scanner.nextLine() throws java.util.InputMismatchException
问题 I'm new to classes and stuff like that. All I'm trying to do for now is to make the inventory hold one item and then when it works I'll research on how to make multiple Item objects and how to keep the program going so the "edit" and "remove" methods work. So basically this a test for an inventory and items project. Inventory class: When I run the project and enter a String: (S1) it tells me this: Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwFor