List<double[]> x = new ArrayList<double[]>();
x.add(new double[]={1,2,3,4,54,6});
元素 1,2,3,4,54,6 添加到 x
x.get(0) ---> returns 1
但是这样做会添加数组的地址吗?为什么
List<double[]> x = new ArrayList<double[]>();
double[] name=new double[5];
name[0]=1
name[1]=3;
name[2]=3;
.
.
.
.
x.add(name);
getting x.get(0) ---> returns @as12cd2 (address of the array)