Here you can find the source of randomBigDecimal()
public static BigDecimal randomBigDecimal()
//package com.java2s; //License from project: Apache License import java.math.BigDecimal; import java.util.Random; public class Main { private static Random sRandom = new Random(); public static BigDecimal randomBigDecimal() { return BigDecimal.valueOf(randomdouble()); }/* w w w. java 2s . c o m*/ public static double randomdouble() { return sRandom.nextDouble(); } public static Double randomDouble() { return Double.valueOf(randomdouble()); } }