Scanner in = new Scanner(System.in); String i1 = in.nextLine();//输入"ab cd"获取到"ab cd" String i2 = in.next();//输入"ab cd"只能获取到"ab" int i3 = in.nextInt();//获取整数型