Question: Write a Java program that reads the file input.txt and writes all even values from this file into a new file called output.txt try/catch throws
Write a Java program that reads the file "input.txt" and writes all even values from this file into a new file called "output.txt
try/catch throws FileNotFoundException. OUTPUT SAMPLE #1 Please input the name of the file to be opened input. tx File Not Found! OUTPUT SAMPLE #2 for OUTPUT SAMPLE #1 for input.txt xx x xx input.txt xx x xx 10 12 13 5 10 12 1 3 5 34 x 2 5 7 9 x x 44 34 x 2 5 79 x x 44 Found 11 numbers file. Please input the name of the open the file output.txt to get the file to be opened input.txt output Found 11 numbers/file. output.txt 10 12 34 2 44 Open the file output.txt to get the output. OUTPUT SAMPLE #2 for input.txt: output.txt 10 12 34 2 44 The file doesn't contain any integers OUTPUT SAMPLE #3 for Exit program input.txt xx xx xx x x xxx x XX X X X Please input the name of the file to be opened input.txt The file doesn't contain any integers Exit program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
