Question: 2. [20] Write the definition of a Java method named join2files that receives three String arguments. The first two arguments name two files that exist

 2. [20] Write the definition of a Java method named join2files

2. [20] Write the definition of a Java method named join2files that receives three String arguments. The first two arguments name two files that exist and contain a single line. The third argument is the name of a file that doesn't yet exist. The join2files method writes the first line of each of the two files that exist to the third file, whose name is given by the third argument. The method doesn't return any value, but when it returns the third file will have two lines in it (coming from the other two files)

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!