Here you can find the source of reverse(List
static public <T> List<T> reverse(List<T> list)
//package com.java2s; //License from project: BSD License import java.util.ArrayList; import java.util.List; import java.util.ListIterator; public class Main { static public <T> List<T> reverse(List<T> list) { List<T> result = new ArrayList<T>(list.size()); ListIterator<T> it = list.listIterator(list.size()); while (it.hasPrevious()) { result.add(it.previous());// www. j av a2 s. c o m } return result; } }