提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
比较两个双精度数组
/* from 时 代 J a v a 公 众 号 - N o w J a v a . c o m */ import java.util.Arrays; public class Main { public static void main(String[] args) { double[] dblArray1 = new double[]{10.3,7.13,41.2}; double[] dblArray2 = new double[]{10.3,7.13,41.2}; boolean blnResult = Arrays.equals(dblArray1,dblArray2); System.out.println("Are two double arrays equal ? : " + blnResult); } }