小弟刚学JAVA,感觉JAVA输入输出很麻烦,比如,像指定行的输入,接收,我知道
Scanner s=new Scanner(System.in);
String a=s.nextLine();
String b=s.nextLine();
String c=s.nextLine();
....
.....但如果,没有指定行数,而是随机输入几行呢,怎么办
Scanner s=new Scanner(System.in);
String a=s.nextLine();
String b=s.nextLine();
String c=s.nextLine();
....
.....但如果,没有指定行数,而是随机输入几行呢,怎么办
scan.hasNextLine()