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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    615
    mikeb
    Jun 24, 2004
  2. globalrev
    Replies:
    4
    Views:
    1,061
    Gabriel Genellina
    Apr 20, 2008
  3. markspace
    Replies:
    1
    Views:
    509
    markspace
    Jun 25, 2009
  4. Roedy Green
    Replies:
    1
    Views:
    542
    Roedy Green
    Jun 25, 2009
  5. Dominic Son

    Sorting through an array of an array

    Dominic Son, Oct 13, 2006, in forum: Ruby
    Replies:
    5
    Views:
    174
  6. Andrew Poulos

    Sorting array against other array

    Andrew Poulos, Jan 17, 2007, in forum: Javascript
    Replies:
    4
    Views:
    210
    Andrew Poulos
    Jan 23, 2007
  7. Tuxedo
    Replies:
    8
    Views:
    276
    Tuxedo
    May 7, 2007
  8. VK
    Replies:
    15
    Views:
    1,891
    Dr J R Stockton
    May 2, 2010
Loading...