日期:2014-05-20  浏览次数:21396 次

random for a series of random numbers??????
Using   Math.random   works   well   when   you   need   to   generate   a   single   random   number.   If   you   need   to   generate   a   series   of   random   numbers,   you   should   create   an   instance   of   java.util.Random   and   invoke   methods   on   that   object   to   generate   numbers.   

我想让大家帮忙给俺个这样的例子,用java.util.Random中的哪些方法就可以产生一系列的随机数呢???

------解决方案--------------------
nextBytes(byte[] bytes)
------解决方案--------------------
Random r = new Random ();
r.nextDouble(),r.nextFloat(),r.nextInt()...
------解决方案--------------------
blog 更新:
think in java 各章后练习答案.....
http://blog.csdn.net/heimaoxiaozi/