读取年龄后,由于缓冲区中仍然有换行符,请将其更改为..
System.out.print("Name : ");String name = in.nextLine();System.out.print("Age : ");int age = in.nextInt();//addin.nextLine();System.out.print("City : ");String city = in.nextLine();
读取年龄后,由于缓冲区中仍然有换行符,请将其更改为..
System.out.print("Name : ");String name = in.nextLine();System.out.print("Age : ");int age = in.nextInt();//addin.nextLine();System.out.print("City : ");String city = in.nextLine();