Question: Q-1: Write a program (AddLineNumbers) that reads a file (file.txt) and writes a copy of the file to another file (output.txt) with line number inserted
Q-1: Write a program (AddLineNumbers) that reads a file (file.txt) and writes a copy of the file to another file (output.txt) with line number inserted into the beginning of each line.
file: /** data input * TXT */ public class Hello { public static void main( String [] args ) { System.out.println( "Hello" ); } } Q-2: Write a program (ReadTextFile) that reads a file (file2.txt) that contains only one line; output all the character per line.
file2:
hello
note : java language and topic is : exception and I/O operations
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
