开发者

define bigrand function in java

开发者 https://www.devze.com 2023-01-01 17:51 出处:网络
here is code of bigrand function in c code int bigrand (){ returnRAND_MAX* rand()+rand(); } pleas开发者_开发百科e tell me what is equivalentcode in java?java.util.Random is the Java SE random gene

here is code of bigrand function in c code

int bigrand (){
 return  RAND_MAX* rand()+rand();
}

pleas开发者_开发百科e tell me what is equivalent code in java?


java.util.Random is the Java SE random generator, with subclasses e.g. java.security.SecureRandom for a more cryptographically stronger generator.

API links

  • int nextInt(int n)
    • Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive)
  • double nextDouble()
    • Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0
0

精彩评论

暂无评论...
验证码 换一张
取 消