Check out example codes for "reading string after double in java". It will help you in understanding the concepts better.

Code Example 1

myInt = scan.nextInt();
myDouble = scan.nextDouble();
scan.nextLine(); // Skip the remainder of the double line
myString = scan.nextLine();

Learn ReactJs, React Native from akashmittal.com