how does .equals work when comparing an array
Array inside Array. Arrays.equals() method does not compare recursively if an array contains another array on other hand Arrays.deepEquals() method compare recursively if an array contains another array. Arrays.equals() check is if element is null or not and then calls equals() method, it does not check for Array type.