标签:java log sdn out stat mat sys and span
http://blog.csdn.net/huangbiao86/article/details/6433964 java中Math.random()与java.util.random()的区别
public class Random1 { public static void main(String[] args) { // TODO 自动生成的方法存根 for(int i=10;i<30;i++){ System.out.println((int)(1+Math.random()*10)); //1-10的随机数 } } }
import java.util.Random; public class Random2 { public static void main(String[] args) { Random rr = new Random(); int number = rr.nextInt(10); //输出1-10随机数 System.out.println(1+number);//不1+则输出0-10随机数 } }
http://blog.sina.com.cn/s/blog_4f925fc30100uvur.html 更详细的Random
http://blog.csdn.net/gao454917848/article/details/38557101 整洁性的Random解释
标签:java log sdn out stat mat sys and span
原文地址:http://www.cnblogs.com/ukzq/p/7529101.html