Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Random sorting of an array

Reply
Thread Tools

Random sorting of an array

 
 
Mike
Guest
Posts: n/a
 
      06-18-2006

How can I randomly sort an array of strings?
 
Reply With Quote
 
 
 
 
Patricia Shanahan
Guest
Posts: n/a
 
      06-18-2006
Mike wrote:
> How can I randomly sort an array of strings?


Collections.shuffle(Arrays.asList(data));

Patricia
 
Reply With Quote
 
 
 
 
Thomas Hawtin
Guest
Posts: n/a
 
      06-18-2006
Mike wrote:
> How can I randomly sort an array of strings?


Collections.shuffle(Arrays.asList(myArrayOfStrings ));

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
 
Reply With Quote
 
Justin
Guest
Posts: n/a
 
      06-18-2006

Thomas Hawtin wrote:
> --
> Unemployed English Java programmer
> http://jroller.com/page/tackline/


I just checked out the site you above mentioned. Its one of the coolest
java discussion sites i have ever visited. Keep up the good work. I
really liked your site. I would like to suggest it to all members of my
group as well as all my friends.

with regards
justin

 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      06-18-2006

That was quick! Thank you to you both.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Math.random() and Math.round(Math.random()) and Math.floor(Math.random()*2) VK Javascript 15 05-02-2010 03:43 PM
Re: Array objects get changed when sorting the array Roedy Green Java 1 06-25-2009 08:25 PM
Re: Array objects get changed when sorting the array markspace Java 1 06-25-2009 06:22 PM
random.random(), random not defined!? globalrev Python 4 04-20-2008 08:12 AM
Shuffle array elements (3 to end of array) in random order Tuxedo Javascript 8 05-07-2007 03:28 PM



Advertisments