jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes random no generator Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "random no generator" Watch "random no generator" New topic

random no generator

srini Raman
Ranch Hand

Joined: Oct 16, 2006
Posts: 33
I want to know the cycle length of Random,SecureRandom for best,worst,average cases.

John Kelty
Ranch Hand

Joined: Aug 08, 2006
Posts: 33
A stumper of a question, it seems!


is a good place to start some research although it doesn't answer your exact question. It does mention that the two low order bits are rather predictable.
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
Another place to look would be in the Java source itself (in src.jar or src.zip, depending on your installation). Not only does it tell you exactly what Random does, but the comments give a reference to where you can look for more info.

"I'm not back." - Bill Harding, Twister
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3753

Sorry "srini TR" but your name still does not conform to our naming policy. Please try again. This is your second warning.

[OCA 8 Book] [Blog]
I agree. Here's the link: http://aspose.com/file-tools
subject: random no generator
It's not a secret anymore!