Moy_Desu Moy_Desu - 1 year ago 110
Java Question

Having trouble with java syntax

I want to create a Random class constant and use nextDouble to get a single random number between 0 and 1. I'm having trouble with the syntax to declare the constant.

public static final double (?)

I've tried looking at Oracle but that confused me a bit.

Answer Source
 final Random random = new Random();
 double randomNumber = random.nextDouble();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download