Moy_Desu Moy_Desu - 1 month ago 9
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
 final Random random = new Random();
 double randomNumber = random.nextDouble();