How to sort a List<Object> alphabetically using Object name field

后端 未结 16 1432
暗喜
暗喜 2020-11-28 06:00

I have a List of Objects like List p.I want to sort this list alphabetically using Object name field. Object contains 10 field and name field is o
16条回答
  •  感情败类
    2020-11-28 06:08

    I found another way to do the type.

    if(listAxu.size() > 0){
        Collections.sort(listAxu, Comparator.comparing(IdentityNamed::getDescricao));
    }
    

提交回复
热议问题