Results 1 to 3 of 3
- 11-13-2012, 08:55 AM #1
Member
- Join Date
- Sep 2012
- Posts
- 11
- Rep Power
- 0
Sorting ArrayList consisting of String Arrays.
Hello ,
I have an ArrayList filled with String Arrays, Example : "ArrayList(0-7)[0-7]". There are 8 Different String Arrays in the ArrayList and every String Array Consist of "8 blocks" , index number 4 in every String Array contains a name.
I Want these sorted alphabetically , please give me an hint on how to proceed , or if you need more info to be able to help me i will explain more.
Best Regards
Problemer
- 11-13-2012, 09:15 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,377
- Blog Entries
- 7
- Rep Power
- 17
Re: Sorting ArrayList consisting of String Arrays.
Read all about it in the API documentation of the Comparator interface; your implementation should compare two String arrays and the Collections.sort( ... ) method does the hard work.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 11-13-2012, 05:04 PM #3
Member
- Join Date
- Sep 2012
- Posts
- 11
- Rep Power
- 0
Similar Threads
-
Adding a Value to an Arraylist of String arrays.
By Problemer in forum New To JavaReplies: 5Last Post: 11-01-2012, 02:50 PM -
Selecting certain number from string consisting of numbers
By Vingilot in forum New To JavaReplies: 1Last Post: 03-06-2012, 12:21 AM -
How do you use an arraylist of string arrays
By uhertz in forum New To JavaReplies: 1Last Post: 01-16-2012, 09:38 AM -
Scanner, while loop and sorting arrays/string?
By RSYR in forum New To JavaReplies: 10Last Post: 04-20-2011, 06:13 PM -
Put String Arrays inside an Arraylist (or anyother list)
By Toirniuil in forum New To JavaReplies: 8Last Post: 10-08-2010, 07:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks