This is happening because of the Scanner.nextInt method does not read the newline character in the input generated by hitting "Enter," and so the call to Scanner.nextLine retorts after reading that newline.
You will face alike behavior when you use Scanner.nextLine after Scanner.next() or any Scanner.nextFoo method (excluding nextLine itself).
You can try to:
Either put a Scanner.nextLine call after various Scanner.nextInt or Scanner.nextFoo to utilize rest of that line including newline
int option = input.nextInt();
input.nextLine(); // Consume newline left-over
String str1 = input.nextLine();
Or, even commendable, read the input by Scanner.nextLine and change the input to the proper format you want. For example, you may change to an integer using Integer.parseInt(String) method.
int option = 0;
try {
option = Integer.parseInt(input.nextLine());
} catch (NumberFormatException e) {
e.printStackTrace();
}
String str1 = input.nextLine();
Happy Learning..!!