write a jave program to read contents and display the number of lines in a file
Answers
Answered by
2
Explanation:
Example 1: Java program to count the number of lines in a file using Scanner class. In the above example, we have used the nextLine() method of the Scanner class to access each line of the file. Here, depending on the number of lines the file input. txt file contains, the program shows the output.
Today is my birtday give me as brainlest
Similar questions