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
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,
Jos
Re: Sorting ArrayList consisting of String Arrays.
Done , Used CompareTo , what was not clear to me even if i have done bubble-sorting exercises was that i needed to add a couple of for loops...anyway thats how i did it. Task is finished.