@@ -0,0 +1,925 @@
+package java_problems.introduction;%0D%0A%0D%0Aimport java.util.*;%0D%0A%0D%0A/*%0D%0A * Sometimes you don't know how many lines are there in a file and you need to%0D%0A * read the file until EOF or End-of-file. In this problem you need to read a%0D%0A * file until EOF and print the contents of the file. You must take input from%0D%0A * stdin(System.in).%0D%0A * %0D%0A * Input Format:%0D%0A * %0D%0A * Each line will contain a non-empty string. Read until EOF.%0D%0A * %0D%0A * Output Format:%0D%0A * %0D%0A * For each line, print the line number followed by a single space and the line%0D%0A * content.%0D%0A * %0D%0A * Sample Input:%0D%0A * %0D%0A * Hello world%0D%0A * I am a file%0D%0A * Read me until end-of-file.%0D%0A */%0D%0Apublic class JavaEndOfFile %7B%0D%0A%0D%0A    public static void main(String%5B%5D args) %7B%0D%0A        Scanner sc = new Scanner(System.in);%0D%0A        int lineNum = 0;%0D%0A        while (sc.hasNext()) %7B%0D%0A            System.out.println(++lineNum + %22 %22 + sc.nextLine());%0D%0A        %7D%0D%0A        sc.close();%0D%0A    %7D%0D%0A%7D

Add JavaEndOfFile