Java 生成随机数两种方法 1、Random类中的nextXxxx系列方法生成0-n的随机数 2、Math类的random()方法可以生成 [0.00,1.00) 范围内的double型随机数 转载于:https://www.cnblogs.com/sangong/p/9576512.html