Here you can find the source of removeFrom(List> col, int from)
public static void removeFrom(List<?> col, int from)
//package com.java2s; /******************************************************************************* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com.// w ww. j a v a 2 s .c om * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ import java.util.List; public class Main { public static void removeFrom(List<?> col, int from) { for (int i = col.size() - 1; i > from; i--) col.remove(i); } }