Java End-of-file

  • + 0 comments

    Java Solution==========================================

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

    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. */
        int count = 0;
    
        Scanner scanner = new Scanner(System.in);
    
    
        while (scanner.hasNext()) {
            String linea = scanner.nextLine();
            count ++;
            System.out.println(count +" "+linea);
        }
    
    }
    

    }