1) Build a method which reads 3 integers from the console and returns them as an
ID: 3743406 • Letter: 1
Question
1) Build a method which reads 3 integers from the console and returns them as an int array (type a number, then hit enter, 3 times).
2) Call this method twice to store 2 local int array variables.
3) Once both arrays are built, write a method which accepts the two arrays and compares the contents to see if they match. If the method returns true (the arrays match), display "Arrays match" in the console. Otherwise, display "Arrays don't match" in the console.
4) Finally, ensure at the end, that the user must hit the enter key in order to exit the program.
Explanation / Answer
Please find below the code : ( https://pastebin.com/VyGu6YkJ )
//CompareList.java
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.