Java 2D ArrayList and sorting

前端 未结 3 1494
执笔经年
执笔经年 2021-01-22 22:52

I need to sort a shopping list by the aisle the item is located for example:
[Bread] [1]
[Milk] [2]
[Cereal] [3]

I am planning to do this with ArrayList and

3条回答
  •  轮回少年
    2021-01-22 23:33

    If you want to sort an ArrayList of ArrayLists then you can use the ColumnComparator.

    If you want to sort an ArrayList of your custom Object then you can use the BeanComparator.

提交回复
热议问题