title: How to sort an arrayList when the datatype is not a string Java?
body: <p>I have an arrayList that stores objects. Each object contains string and integer. How can I sort this arrayList alphabetically based on the object's string? (I tried Collections.sort(arrayList's name) but since the arrayList's data type isn't a string, it won't sort.)</p>