Random sorting of an array

Discussion in 'Java' started by Mike, Jun 18, 2006.

  1. Mike

    Mike Guest

    How can I randomly sort an array of strings?
    Mike, Jun 18, 2006
    #1
    1. Advertising

  2. Mike wrote:
    > How can I randomly sort an array of strings?


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

    Patricia
    Patricia Shanahan, Jun 18, 2006
    #2
    1. Advertising

  3. 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/
    Thomas Hawtin, Jun 18, 2006
    #3
  4. Mike

    Justin Guest

    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
    Justin, Jun 18, 2006
    #4
  5. Mike

    Mike Guest

    That was quick! Thank you to you both.
    Mike, Jun 18, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darren Clark

    Random NOt random?

    Darren Clark, Jun 24, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    442
    mikeb
    Jun 24, 2004
  2. Maziar Aflatoun

    Random not really random...

    Maziar Aflatoun, Aug 4, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    26,656
    Maziar Aflatoun
    Aug 5, 2004
  3. Lars-Erik Aabech
    Replies:
    8
    Views:
    821
    Lars-Erik Aabech
    Apr 28, 2005
  4. globalrev
    Replies:
    4
    Views:
    741
    Gabriel Genellina
    Apr 20, 2008
  5. VK
    Replies:
    15
    Views:
    1,115
    Dr J R Stockton
    May 2, 2010
Loading...

Share This Page