Java Arrays equals方法针对double Java Arrays equals方法针对char Java Arrays equals方法针对float Java Arrays equals方法针对double package com.codingdict; import java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { // initializing three double arrays double[] arr1 = new double[] { 1.2, 1.23 }; double[] arr2 = new double[] { 1.2, 1.23 }; double[] arr3 = new double[] { 1.23, 1.2 }; // 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方法针对char Java Arrays equals方法针对float