Array 的操作方法和 String 的操作方法老是弄混>_<,下面就对于这两个对象的常用操作方法进行比较~~ Array ☞ 操作方法 concat():returns a new array comprised of the array on which it is called joined with the array(s) and/or value(s) provided as arguments. var new_array = old_array.concat(value1[,…
public class Test { public static void main(String[] args) { int[] a = {1, 2, 4, 6}; int[] b = a; int[] c = {1, 2, 4, 6}; //下面这个方法打印的是a数组的引用地址 System.out.println(a.toString()); //下面这个方法比较的是两个数组的引用是否相等 System.out.println("a.equals(b):"+a.equals(b…
public class Test { public static void main(String[] args) { int[] a = {1, 2, 4, 6}; int[] b = a; int[] c = {1, 2, 4, 6}; //下面这个方法打印的是a数组的引用地址 System.out.println(a.toString()); //下面这个方法比较的是两个数组的引用是否相等 System.out.println("a.equals(b):"+a.equals(b…