Java tutorial
import java.util.Arrays; public class Main { public static void main(String[] args) { long[] arr1 = new long[] { 1, 23, 12, 45, 54 }; long[] arr2 = new long[] { 1, 23, 12, 45, 54, 67, 78 }; long[] arr3 = new long[] { 1, 23, 12, 45, 54, 67, 78 }; System.out.println(Arrays.equals(arr1, arr2)); System.out.println(Arrays.equals(arr2, arr3)); } }