如原来有一个集合list,list里面是有数据的,现在如果把list中的集合倒序过来,加这代码

Collections.reverse(list);此代码中传入原来的list数据

有这代码后list在变过来了。


当然,如果想复制list集合,也是一句一代码List list1= Collections.copy(list);

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2021-12-20
  • 2021-10-09
  • 2021-12-11
  • 2021-11-19
  • 2021-09-04
  • 2022-01-10
猜你喜欢
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案