Java Arrays equals方法针对Object Java Arrays equals方法针对long Java Arrays equals方法针对byte Java Arrays equals方法针对Object package com.codingdict; import java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { // initiliazing three object arrays Object[] arr1 = new Object[] { 1, 123 }; Object[] arr2 = new Object[] { 1, 123, 22, 4 }; Object[] arr3 = new Object[] { 1, 123 }; // comparing arr1 and arr2 boolean retval = Arrays.equals(arr1, arr2); System.out.println("arr1 and arr2 equal: " + retval); // comparing arr1 and arr3 boolean retval2 = Arrays.equals(arr1, arr3); System.out.println("arr1 and arr3 equal: " + retval2); } } Java Arrays equals方法针对long Java Arrays equals方法针对byte