I managed to find a solution in Java 8:
import java.util.Arrays; ... double[] columnsValue = {...}; Double[] values = Arrays.stream(columnsValue).boxed().toArray(Double[]::new);
I canβt explain what Double[]::new means, because I didnβt know this feature of Java 8 before (actually IntelliJ IDEA wrote it for me), but it looks like it does new Double(double) on each element array.
Pay attention . I tested this only on the desktop, I don't know if it works on Android.
source share