Java Random randomDoubleArray(int size)

Here you can find the source of randomDoubleArray(int size)

Description

random Double Array

License

Open Source License

Declaration

public static double[] randomDoubleArray(int size) 

Method Source Code

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

import java.util.*;

public class Main {
    public static double[] randomDoubleArray(int size) {
        Random rand = new Random(System.currentTimeMillis());
        return randomDoubleArray(size, rand);
    }/*from  w  w  w . j  a v a2  s . c o  m*/

    public static double[] randomDoubleArray(int size, Random rand) {
        double[] ary = new double[size];
        for (int i = 0; i < size; ++i) {
            ary[i] = rand.nextDouble();
        }
        return ary;
    }
}

Related

  1. RandomCode()
  2. randomCode()
  3. randomCSeq()
  4. randomData(Random random, int length)
  5. randomDigit()
  6. randomElement(List list, Random random)
  7. randomElement(T[] items)
  8. randomElementFromArray(T[] source)
  9. randomEntre1eh100()