Check out example codes for "sc.nextline skips". It will help you in understanding the concepts better.

Code Example 1

int option = input.nextInt();
input.nextLine();  // Consume newline left-over
String str1 = input.nextLine();

Learn ReactJs, React Native from akashmittal.com