Here you can find the source of tail(final List
public static <T> List<T> tail(final List<T> list)
//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> tail(final List<T> list) { return drop(list, 1); }/*w ww .j av a 2 s . co m*/ public static <T> List<T> drop(final List<T> list, final int count) { List<T> left = new ArrayList<>(); int lastIndex = count; while (lastIndex < list.size()) { left.add(list.get(lastIndex)); lastIndex++; } return left; } }