How to get a reversed list view on a list in Java?

前端 未结 12 784
自闭症患者
自闭症患者 2020-11-28 21:05

I want to have a reversed list view on a list (in a similar way than List#sublist provides a sublist view on a list). Is there some function which provides this

12条回答
  •  清歌不尽
    2020-11-28 21:33

    If i have understood correct then it is one line of code .It worked for me .

     Collections.reverse(yourList);
    

提交回复
热议问题