Here you can find the source of firstObjectFromList(List list)
public static Object firstObjectFromList(List list)
//package com.java2s; import java.util.List; public class Main { public static Object firstObjectFromList(List list) { Object result = null;// w w w . j a va2s . co m if (list != null && list.size() > 0) { result = list.get(0); } return result; } }