Android examples for java.util:Random Double
random Double
import java.util.Random; import android.os.SystemClock; public class Main{ private static final Random mRandom; public static double randomDouble(double maximum) { return mRandom.nextDouble() * maximum; }//from www . j a va2s .c o m public static double randomDouble(double minimum, double maximum) { return randomDouble(maximum - minimum) + minimum; } }