public static void compareArrays(int[] array1, int[] array2) { boolean b = true; if (array1 != null && array2 != null){ if (array1.length != array2.length) b = false; else for (int i = 0; i < array2.length; i++) { if (array2[i] != array1[i]) {b = false;} } }else{ b = false; } System.out.println(b); }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)