Question: This is a Java Homework 1- You will write a main method that will display the number of lines in two separate files that are

This is a Java Homework

This is a Java Homework 1- You will write a main method

1- You will write a main method that will display the number of lines in two separate files that are the same. We will pass two (2) command line parameters that will be the file names of the two files we want to compare. For example, given the shown files, if we put this main method inside of a class named "CompareFiles", we should be able to get these example results: > java CompareFiles File1.txt File2.txt Lines that are the same: 3 > java CompareFiles File1.txt File3.txt Lines that are the same: 1 > java CompareFiles File2.txt File3.txt Lines that are the same: 2

2- Write the text of an example file below. This file will be named "File4.txt".

3- What is the result when the following is executed? > java CompareFiles File3.txt File4.txt

4- What is the result when the following is executed? > java CompareFiles File4.txt File4.txt

File1.txt - File2.txt File3.txt - 1 File Edit Fc File Edit File Edit FC Line 1 Line 1 Line One Line 2 Line 2 Line Two Line 3 Line 3 Line 3 Line Four Line 4 Line 4

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 Databases Questions!