Java List Last Item removeLastElements(List list, int fromIdx)

Here you can find the source of removeLastElements(List list, int fromIdx)

Description

fromIndex, inclusive, and toIndex, exclusive

License

Open Source License

Declaration

public static <E> void removeLastElements(List<E> list, int fromIdx) 

Method Source Code

//package com.java2s;

import java.util.List;

public class Main {
    /**/*from www. j a  va 2 s  .  c  o m*/
     * fromIndex, inclusive, 
     * and toIndex, exclusive
     */
    public static <E> void removeLastElements(List<E> list, int fromIdx) {
        list.subList(fromIdx, list.size()).clear();
    }
}

Related

  1. removeBySwapLast(List a, Object o)
  2. removeLast(List list)
  3. removeLast(List aList)
  4. removeLast(List l)
  5. removeLast(List list)