take input int and then string in java code example
Example: reading string after double in java
myInt = scan.nextInt();
myDouble = scan.nextDouble();
scan.nextLine(); // Skip the remainder of the double line
myString = scan.nextLine();
myInt = scan.nextInt();
myDouble = scan.nextDouble();
scan.nextLine(); // Skip the remainder of the double line
myString = scan.nextLine();