java如何在字符串输入之后接受长输入
Scanner sc = new Scanner(System.in);
System.out.println("Enter the details given below.");
System.out.println("Name:");name=sc.next();
sc.next();
System.out.println("Phone/mobile number:+91 ");phone_num=sc.nextLong();
System.out.println("Home Address:");address=sc.next();
sc.next();
System.out.println("Pincode:");pincode=sc.nextLong();
System.out.println("E-mail address:");e_mail=sc.next();
sc.next();
此代码段不允许我将输入带到pincode变量
共 (0) 个答案