[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sorting a collection
You will need to write your own Comparator class to handle that type of
sort behavior and then use the sort(List list, Comparator c) method of the
Collections class. Your Comparator class would be easy to write, just
have to compare ignoring case.
Matthew
At 11:29 AM 7/3/2002 -0400, Wade Steele wrote:
>
>
>
> As you know, the sort() method will
> sort arays like this
>
> Acorns
> Bees
> Birds
> Cows
> apples
> rocks
>
> I need to sort my arrays like this
>
> Acorns
> apples
> Bees
> Birds
> Cows
> rocks
>
> Any idea how I can do this? I need
> it to be completely case
> insensitive.
>
> Thanks,
>
> Wade
>
>