import java.util.Arrays; public class Main { public static void main(String[] args) { int[] a1 = new int[] { 2, 7, 1 }; int[] a2 = new int[] { 2, 7, 1 }; System.out.println(Arrays.equals(a1, a2)); } }