Here you can find the source of reverse(List
private static <F> List<F> reverse(List<F> source)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { private static <F> List<F> reverse(List<F> source) { ArrayList<F> backwardsSource = new ArrayList<F>(source); Collections.reverse(backwardsSource); return backwardsSource; }//w w w . ja va2s . com }