Check Two Arrays are Deeply Equal

Java Array Examples

Java Arrays class provides deepEquals(Object[] a1, Object[] a2) method which returns true if the two specified arrays are deeply equal to one another.

Check Two Arrays are Deeply Equal Example

String[] strArray1 = { "abc", "cdf", "pqr" };
String[] strArray2 = { "abc", "cdf", "pqr" };
System.out.println("Two Arrays Deep Equals ::  " + Arrays.deepEquals(strArray1, strArray2));
Two Arrays Deep Equals ::  true


Free Spring Boot Tutorial - 5 Hours Full Course

Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course