可借助一些工具,如common-math中ArrayUtils:
Double[] eArray={0.1,0.2,0.3}; double[] cArray=ArrayUtils.toPrimitive(eArray); double[] ePrimitive = Stream.of(eArray).mapToDouble(Double::doubleValue).toArray();