I have a List<Person>
. Person's attributes are String name, String secondName, int phoneNum.
How can I sort this List by the String property secondName?
I've tried moving into another List<String>
the data from the previous list moving secondName to the first position, then applying Collection.sort and creating other List<Person>
with the data of the List sorted but its too complicated.