![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Duh. As I was out on my bike ride today, it occurred to me that Java does have a method for sorting Lists in the API. I had a vague impression that I had seen a list somewhere that had it already, but I thought it was Python, because when I looked at the List interface in my Java docs, there was no shuffle(). Java's does have it, though, it is just a little trickier to find because it is a static method of Collections, rather than a method of List, or one of its implementations. So all the previous example code could be reduced to - mfg
Replies:
|
Sponsored Links
|