Here you can find the source of removeFirst(List
public static <T> List<T> removeFirst(List<T> list)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> removeFirst(List<T> list) { if (list != null && list.size() > 0) { List<T> newList = new ArrayList<T>(); for (int i = 1; i < list.size(); i++) { T t = list.get(i);//from w ww . ja v a2s . c o m newList.add(t); } return newList; } else { return list; } } }