L9.4: Compare two arrays Example #2

PHOTO EMBED

Mon Sep 26 2022 23:04:08 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, 101};

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

    }
}
// Output: true
content_copyCOPY