I had problem where nextLine was ignoring user input. After some research, I found that I have to clear the Scanner using in.nextLine(), but can you tell me why? I would like to know what I'm doing when I use this:
String edit = in.nextLine();
switch (edit) {
    case "name":
        System.out.println("Enter new name for " + items.get((editItem - 1)).getName());
        String newName = in.nextLine();
        items.get((editItem - 1)).setName(newName);
 
     
    