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

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
Get step-by-step solutions from verified subject matter experts
