Where the errors in this code | Sololearn: Learn to code for FREE!

0

Where the errors in this code

https://code.sololearn.com/cnG5rB9ikwgq/?ref=app

2 Answers

New Answer

0

Import IOException: 'import java.io.IOException;' And in the main method add: public static void main(String[] args) throws IOException{ ... } Add the 'throws IOException' part.

0

This code compares whether the elements are also in the second array, regardless of their position where. It's a bit misleading to call result 'identical arrays' and name the method equals() However, if this is the assignment, the program seems to be working. example of input 1 2 3 4 5 6 7 8 9 2 7 1 8 3 9 5 4 6