格式:Arrays.equals(数组a, 数组b)
返回值为布尔值
代码案例:
1 import java.util.Arrays; 2 3 public class HelloWorld { 4 public static void main(String[] args) { 5 int a[] = new int[] { 18, 62, 68, 82, 65, 9 }; 6 int b[] = new int[] { 18, 62, 68, 82, 65, 8 }; 7 8 System.out.println(Arrays.equals(a, b));//false 9 } 10 }