Java Stdin and Stdout II

  • + 6 comments

    Because scan.nextLine() read one line of input,while scan.nextInt () reads only one integer. Therefore, in the second line , it would still be necessary to read the line break and the carriage return (\ n \ r), that is, this additional string must be read in order to store the next line to store it in s.