Java End-of-file

  • + 0 comments
      try(Scanner scan = new Scanner(System.in)){
                int count = 1;
                while(scan.hasNext()){
                    System.out.println((count++) + " " + scan.nextLine());                
                }
            }