Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    /**
     * Transform a list of objects into an array of primitives
     * 
     * @param listOfObject
     * @return
     */
    public static double[] convertToPrimitives(List<Double> listOfObjects) {
        return listOfObjects.stream().mapToDouble(Double::doubleValue).toArray();
    }
}