Java End-of-file

  • + 0 comments

    import java.util.Scanner; public class Solution {

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

    }