Arrays.sort() for arrays. Collections.sort() for collections.
http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collections.html#sort(java.uti
l.List)
opalpa
opalpa@gmail.com
http://opalpa.info/
Thanks both Arrays.sort is what I was looking for. But I still have an
issue with the order in which it sorts.
I have following input
Aa bB Cc
aa bb cc
Aa Bb Cc
Aa bb Cc
Aa bb cc
bb cc aa
and I get the following output
aa bb cc
bb cc aa
Aa bb cc
Aa bb Cc
Aa bB Cc
Aa Bb Cc
But I would like to get
aa bb cc and then
Aa bb Cc
Is there a way to do this in the sort?
'Thanks.
> Arrays.sort() for arrays. Collections.sort() for collections.
>
[quoted text clipped - 3 lines]
> opalpa@gmail.com
> http://opalpa.info/
Patricia Shanahan - 10 Oct 2006 14:51 GMT
> Thanks both Arrays.sort is what I was looking for. But I still have an
> issue with the order in which it sorts.
[quoted text clipped - 22 lines]
>
> Is there a way to do this in the sort?
Supply a Comparator that implements the ordering you want.
Patricia