I have a bit of a problem with a part of my code.
if (option1 == 1){
//Add Movie
System.out.print('\u000C');
System.out.println(">>Add Movie<<");
System.out.println("");
System.out.print("Title: ");
String title = scan.nextLine();
System.out.print("Year: ");
int year = scan.nextInt();
}
When i execute the code, it prints out,
Title: Year:
completely skipping the scan.nextLine(); so I'm unable to put any input for it.
Does anyone have an idea on why it is doing this?
EDIT:
I've managed up to fix this. Turns out if was a scan.nextLine();
error and it had not fully moved to a new line. Thanks everyone :)