Question - How to check two arrays to see if contents have the same types and contain the same elements?
Answer -
One of options is to use the equals() method of Arrays class.
Arrays.equals(a, b);
If the array types are different, a compile-time error will happen.