📅  最后修改于: 2022-03-11 14:52:47.192000             🧑  作者: Mango
Scanner scanner = new Scanner(System.in);
System.out.println("What's your name?");
String name = scanner.nextLine();
System.out.println("What's your year of birth?");
int yearOfBirth = scanner.nextInt();