I have a project the is suppose add an input to an array list. I used scanner.util for my input, I'm suppose to input a Title = (String) and ID = (int), after input the project then provides me an option to input another or exit, for this i used while loop that when the input value is not equal to "Exit", loop. The problem is my project skips the input option to Exit or continue, does anyone have any idea how to fix it???
here is the code
String option = "";
while(!option.equals("Exit"))
{
System.out.println("Add your New Movie below\n");
movie.setName(input.nextLine());
movie.setid(input.nextInt());
System.out.println("Type in 'Quit'to end, type anything to add another Movie");
movieList.add(movie.getid() + " " + movie.getName());
option = input.nextLine();
}