Here you can find the source of removeLast(List
public static <T> T removeLast(List<T> l)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <T> T removeLast(List<T> l) { return l.remove(l.size() - 1); }/*from w w w. j a v a 2 s .co m*/ }