Random: nextDouble : Random « java.util « Java by API
- Java by API
- java.util
- Random
Random: nextDouble
/*
* Output:
*
* 0.8102628210601169
*
*/
import java.util.Random;
public class MainClass {
public static void main(String args[]) {
Random rand = new Random();
System.out.println(rand.nextDouble());
}
}
Related examples in the same category