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();,為什么程序不會(huì)執(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();,為什么程序不會(huì)執(zhí)行
2015-10-19
舉報(bào)
2015-10-20
沒報(bào)錯(cuò),但程序不能運(yùn)行
2015-10-20
有報(bào)錯(cuò)信息嗎?