Sorting an ArrayList of Objects alphabetically

前端 未结 5 573
一个人的身影
一个人的身影 2021-02-02 08:49

I have to create a method that sorts an ArrayList of objects alphabetically according to email and then prints the sorted array. The part that I am having trouble with

5条回答
  •  粉色の甜心
    2021-02-02 09:36

    In this link you can find code which will help you to sort arraylist of objects in descending and ascending order.

    http://beginnersbook.com/2013/12/java-arraylist-of-object-sort-example-comparable-and-comparator/

提交回复
热议问题