Java tutorial
import java.util.Arrays; public class Main { public static void main(String[] args) { int[] arr1 = new int[] { 1, 12, 5, 6 }; int[] arr2 = new int[] { 1, 12, 5, 6 }; int[] arr3 = new int[] { 1, 5, 6, 12 }; System.out.println(Arrays.equals(arr1, arr2)); System.out.println(Arrays.equals(arr2, arr3)); } }