import java.util.Arrays;
int[] a = new int[] { 1, 2, 3 };
int[] b = new int[] { 1, 2, 3 };
boolean test=Arrays.equals(a, b);
System.err.println(test);
输出结果为:
true
import java.util.Arrays;
int[] a = new int[] { 1, 2, 3 };
int[] b = new int[] { 1, 2, 3 };
boolean test=Arrays.equals(a, b);
System.err.println(test);
输出结果为:
true