How can i stick together the objects and it's attributes when dealing with sorting , like sorting their names for example how can i not mess the attributes of object in my list , it's need to be intact pls help
Read the names when comparing which objects need to be sorted. But only move the object, don't move the name. Example pseudo code : if myList.get(i).name > myList.get(i+1).name swap(myList.get(i), myList.get(i+1))