I\'m implementing an interface that has functionality similar to a table that can contain an types of objects. The interface specifies the following function:
In Java 8, this is one-liner:
Double[] boxed = new Double[] { 1.0, 2.0, 3.0 }; double[] unboxed = Stream.of(boxed).mapToDouble(Double::doubleValue).toArray();
Note that this still iterates over the original array and creates a new one.