Sagewire Logo

Sorting an ArrayList[code][/code]

3 Message(s) by 2 Author(s) originally posted in java language


From: Shane Date:   Saturday, March 03, 2007
Hi
I am really new to JAVA. I've created an ArrayList<String> and want to
sort the elements. I tried using toArray(), but I cannot grok the docs I
found at
http://JAVA.sun.com/j2se/1.4.2/docs/api/JAVA/util/ArrayList.html#toArray()

This seems like it should be trivial but I am just not 'getting it'

TIA


From: dweesie Date:   Monday, March 05, 2007
wrote in message:
Hi
I am really new to JAVA. I've created an ArrayList<String> and want to
sort the elements. I tried using toArray(), but I cannot grok the docs I
found athttp://JAVA.sun.com/j2se/1.4.2/docs/api/JAVA/util/ArrayList.html#toArray()
This seems like it should be trivial but I am just not 'getting it'
TIA



See Collections.sort(List);


From: Shane Date:   Monday, March 05, 2007
wrote in message:

wrote in message:
Hi
I am really new to JAVA. I've created an ArrayList<String> and want to
sort the elements. I tried using toArray(), but I cannot grok the docs
I found



athttp://JAVA.sun.com/j2se/1.4.2/docs/api/JAVA/util/ArrayList.html#toArray()

This seems like it should be trivial but I am just not 'getting it'

TIA
See Collections.sort(List);



Awesome thanks :)



Next Message: which JAVA audio function to use?



Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional