Here you can find the source of first(List
public static <T> T first(List<T> l)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static <T> T first(List<T> l) { return l.get(0); }/*from ww w . ja va2 s .c o m*/ }