java ArrayList倒序

用Collections.reverse(list)即可。如:
List<String> list = Arrays.asList(new String[] {"aa", "bb", "cc", "dd", "ee"});
Collections.reverse(list);
for (String string : list) {
System.out.println(string);
}
posted @ 2017-11-10 14:36  甜菜波波  阅读(8772)  评论(0编辑  收藏  举报