How much does input order matter?
Here is my question, when I write my code block waiting for inputs as the following, it skips my input to the last question when run in Eclipse. import java.util.Scanner; class Inputs{ public static void main(String[]args){ Scanner info = new Scanner(System.in); System.out.println("What's your name?"); String name = (info.nextLine()); System.out.println("How old are you?"); int age = (info.nextInt()); System.out.println("How cool are you?"); String cool = (info.nextLine()); System.out.println("Your name is, " + name +". You are " + age + " years old." + "You are " + cool + " cool." ); } } However, if I switch age to the last input, it waits for my last input before giving me back the statement at the end. import java.util.Scanner; class Inputs{ public static void main(String[]args){ Scanner info = new Scanner(System.in); System.out.println("What's your name?"); String name = (info.nextLine()); System.out.println("How cool are you?"); String cool = (info.nextLine()); System.out.println("How old are you?"); int age = (info.nextInt()); System.out.println("Your name is, " + name +". You are " + age + " years old." + "You are " + cool + " cool." ); } } Is there a reason for this or something I am missing?