Reference no: EM13699997
Question: Write a Java application that reads a file containing text. Your program should read each line and display it on the console screen preceded by line numbers. If the input file is:
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
Make this program using java programming. Make this application in simple way.
Your program should show something like this:
1. 'Twas brillig, and the slithy toves
2. Did gyre and gimble in the wabe:
3. All mimsy were the borogoves,
4. And the mome raths outgrabe.
If the input file contains blank lines, these are not numbered. The period after the line numbers should line up in the same column on the show. Show the user for the input file name.
Be sure to include comments. The comment should describe the purpose of the program and the data to be entered.