Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> reverse(List<T> list) { List<T> newList = new ArrayList<T>(); for (int i = list.size() - 1; i >= 0; i--) { newList.add(list.get(i)); } return newList; } }