L9.4: Compare two arrays Example #3

PHOTO EMBED

Mon Sep 26 2022 23:05:51 GMT+0000 (Coordinated Universal Time)

Saved by @testpro #java

import java.util.Arrays;

class Main {
    public static void main (String[] args) {

        int[] arr1= {54, 44, 39, 10, 12, 101};
        int[] arr2= {54, 44, 39, 10, 12, 102};

        System.out.println (Arrays.equals(arr1, arr2));

    }
}
// Output: false
content_copyCOPY