Question: I want to have a Java code. This code need read a file called content file( there will be numbers and letters in it) from
I want to have a Java code. This code need read a file called content file( there will be numbers and letters in it) from desktop, and add every character into array1. Users need to type the name of the file. Then it need to read another file called test file. Test file will have two lines of content(letters and numbers), and the elements of the first line of content will be stored in array2, elements in second line will store into array3. Then code need to test , are all the elements in array2 can be found in array1, and all the elements in array3 can be found in array1.
Output should be ''array2 test success'' or ''array2 test fail''. The nest line is about array3, output will be ''array3 test success'' or''array3 test fail''
If it is possible, I want the code can test whether the order can also be detected. If array1 have ''icne'', array2 have ''nice'', then this test is fail. If and only if when the order is correct, system print success, such as ''156t'' in array1, ''1t'' in array2 , test success.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
