I have three array lists with String .I want to sort one arraylist and with same order want to set the element of other two list in java. i can sort one list but how to set element of other two list with sorted list order.
Thanks and regards
Rahul
By far the best way to do this would be to rethink the design and put all three pieces of related data into instances of class designed for this purpose, then just sort the one
ArrayList.Any other method would involve either setting up some
Maps to hold the relationships between theStrings, and then manually moving the lists around after sorting the first one (a difficult mess) or writing your own sorting algorithm which moved the second two lists in tandem with the first (probably easier, but an even worse mess.)