Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to sort an ArrayList's string value alphabeticaly?

807598Oct 5 2006 — edited Jun 2 2008
Hey Guys

I am really stuck sorting my arrays alphabeticaly.

I have got this array list on my class called

allCustomers() .
when i run something like this
public void listAllCustomers()
{
int count;


for(count=0;count<allCustomers.size();count++)
{
Person owner= (Person) allCustomers.get(count);
System.out.println(owner.getName(););

}
}

it does show all the customer names but i was wondering how to put em into alphabetical word..

cheerz guys..
really need help with this..:)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2008
Added on Oct 5 2006
23 comments
266 views