scanner next line only grab part of it code example
Example: sc.nextline skips
int option = input.nextInt();
input.nextLine(); // Consume newline left-over
String str1 = input.nextLine();
int option = input.nextInt();
input.nextLine(); // Consume newline left-over
String str1 = input.nextLine();