How to use Math.random in Java?

To use Math.random in Java, call it like so: Math.random().

Here's how you do it:

double randomValue = Math.random();

// Something between 0 and 1, e.g. 0.4260892950209051
System.out.println(randomValue);