Java End-of-file

  • + 0 comments

    Scanner s1=new Scanner(System.in); int val=1; while(s1.hasNext()) { String word=s1.nextLine(); System.out.printf("%d %s\n",val,word); val++;

        }
    

    s1.close();