📜  java代码示例中的扫描仪

📅  最后修改于: 2022-03-11 14:52:48.448000             🧑  作者: Mango

代码示例6
Scanner scanner = new Scanner(System.in);
String myString = scanner.next();
int myInt = scanner.nextInt();
scanner.close();

System.out.println("myString is: " + myString);
System.out.println("myInt is: " + myInt);