I think there's a built in library for this. The only reason I remembered this is because someone was complaining that they even included a hash function but not Quick Sort. I'd search the Java doc's but the last time I tried to download the SDK, their ftp was down. Maybe someone who has them can search it.