Chapter 4. PC #14. Line Numbers (page 265)
Write a java program that asks the user for the name of a file.The program should display the contents of the file with each linepreceded with a line number followed by a colon. The line numberingshould start at 1.
Required Output
Please enter the file name or type QUIT to exit:n
Please enter the file name or type QUIT to exit:n
File: badfilename.txt does not exist.n
Please enter the file name again or type QUIT to exit:n
Please enter the file name or type QUIT to exit:n
1: an
2: bn
3: cn
4: dn
Expert Answer
An answer will be send
PayPal Gateway not configured
PayPal Gateway not configured