Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import java.util.ArrayList;

public class Main {
    /**
     * transforms an ArrayList of Double values to an Array of double values
     * @param _list the ArrayList with Double values
     * @return an array with double values
     */
    public static double[] getDoubleArrayFromArrayList(ArrayList<Double> _list) {
        double[] res = new double[_list.size()];
        for (int i = 0; i < res.length; i++) {
            res[i] = _list.get(i).doubleValue();
        }
        return res;
    }
}