Java End-of-file

  • + 0 comments

    import java.io.; import java.util.;

    public class Solution {

    public static void main(String[] args) {
        Scanner readObj = new Scanner(System.in);
        int i = 1;
        while(readObj.hasNext()){
            String line = readObj.nextLine();
            System.out.println(i+" "+line);
            i++;
        }
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
    }
    

    }