标签:style blog http java strong 2014
随机数生成20~70之间的数值:
public class Random { public static void main(String[] args) { java.util.Random r = new java.util.Random(); for (int i = 0; i < 10; i++) { System.out.print(" " + (r.nextInt(70) + 20)); } } }
运行结果如下图:
标签:style blog http java strong 2014
原文地址:http://www.cnblogs.com/henuyuxiang/p/3837608.html