Java End-of-file

  • + 0 comments

    solution:

    Scanner in = new Scanner(System.in); int lineNumber=1; while (in.hasNextLine()) { String line = in.nextLine(); System.out.println(lineNumber + " " + line); lineNumber++; //