我试图以这种方式相交 2 个双数组
public double[] intersect(double[] a, double[] b) {
List<double[]> aList = Arrays.asList(a);
List<double[]> bList = Arrays.asList(b);
aList.retainAll(bList);
double[] c = aList.toArray(new double[aList.size()]);
}
不幸的是这条线
double[] c = aList.toArray(new double[aList.size()]);
不编译
我应该如何解决这个问题