Scanner
? Scanner sc=new Scanner(System.in);
? ? ? ? ? ?int x=sc.nextInt();
? ? ? ? ? ?double y=sc.nextDouble();
? ? ? ? ? ?sc.nextLine();
? ? ? ? ? ?String s=sc.nextLine();
為什么要另外寫一句sc.nextLine();直接寫String s=sc.nextLine();,為什么程序不會執(zhí)行
? Scanner sc=new Scanner(System.in);
? ? ? ? ? ?int x=sc.nextInt();
? ? ? ? ? ?double y=sc.nextDouble();
? ? ? ? ? ?sc.nextLine();
? ? ? ? ? ?String s=sc.nextLine();
為什么要另外寫一句sc.nextLine();直接寫String s=sc.nextLine();,為什么程序不會執(zhí)行
2015-10-19
舉報
2015-10-20
沒報錯,但程序不能運行
2015-10-20
有報錯信息嗎?