java.util.Random 和java.lang.Math的random方法

来源:互联网 发布:实时滤镜软件 编辑:程序博客网 时间:2024/04/29 19:49

java.util.Random 是一个类,其中有next(),nextBoolean() ,nextDouble() ,nextFloat() ,nextInt()

nextLong()  ,nextInt(int i)等方法

其中,nextInt()方法  All 232 possible int values are produced with (approximately) equal probability

Math的static random()方法返回一个介意0和1直接的double