Question: Write a program in java that takes the numbers in 2 sorted files and merges them into a third. The program must merge the files.

Write a program in java
that takes the numbers in 2 sorted files and merges them into a third.
The program must merge the files. not input the 2 files into 1 big array, and sort them --so that the numbers in the output file are sorted
Input the file names, and be sure to check the file exists. no need to check if the output file exists, only the 2 input files
after the merge is complete
read the numbers from the output file and print them to the screen
note--either of the 2 input files may have more numbers than the other
based on the book "Building Java Programs: A Back to Basics Approach, 5/ed". Im limited to build the program with the material from chapter 1-6.
avoid BufferedReader and FileReader ,try/catch, IOException don't use them at all. make it as simple as u can

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!