Forums Register Login

Randomize a set of words

+Pie Number of slices to send: Send
Hi. Not sure if this is the right place to post this. We are trying to create a table that has a ton of four letter words in it(minus the nasty ones ). Right now we have the list of words in an Excel spreadsheet in alphabetical order. We want to scramble these so when we use them to be assigned as order codes, they don't get assigned alphabetically. My question is, how do I do this? Can anyone supply me with some java code to get this done, or at least give me a couple of hints where to look?
Thanks in advance!!
+Pie Number of slices to send: Send
Take a look at Collections.shuffle() to see it can help you out.
+Pie Number of slices to send: Send
You can try something like this

This will return the String[] in a completely random order.
[ April 08, 2002: Message edited by: Carl Trusiak ]
+Pie Number of slices to send: Send
Thanks guys!!
Willie Smits can speak 40 languages. This tiny ad can speak only one:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 822 times.
Similar Threads
setting onmouseover javascript
Assignment
getting the ipaddress
why get's printed
The Uncertainty Principle
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:12:16.