Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Collections.shuffle() for ArrayLists

807589Jul 13 2008 — edited Jul 14 2008
I was using Collectins.shuffle with a sigle paramenter(the arraylist name) and noticed that sometimes the result was peculiar, i.e. the same element would come up in the first index every 9 trials or so.

I know there is another version with the name of the object and an int. Is this latter version more useful than the first if given a random number each time?


Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 11 2008
Added on Jul 13 2008
7 comments
300 views