Here you can find the source of getRandomFloatArray()
private static float[] getRandomFloatArray()
//package com.java2s; /******************************************************************************* * Manchester Centre for Integrative Systems Biology * University of Manchester/* w w w . j av a 2 s .co m*/ * Manchester M1 7ND * United Kingdom * * Copyright (C) 2007 University of Manchester * * This program is released under the Academic Free License ("AFL") v3.0. * (http://www.opensource.org/licenses/academic.php) *******************************************************************************/ import java.util.*; public class Main { /** * * @return float[] */ private static float[] getRandomFloatArray() { final int MAX_LENGTH = 1037; final Random random = new Random(); final float[] randomArray = new float[random.nextInt(MAX_LENGTH)]; for (int i = 0; i < randomArray.length; i++) { randomArray[i] = random.nextFloat(); } return randomArray; } }