Java List Last Item getLastElement(List list)

Here you can find the source of getLastElement(List list)

Description

get Last Element

License

Open Source License

Declaration

public static <T> T getLastElement(List<T> list) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.List;

public class Main {
    public static <T> T getLastElement(List<T> list) {
        return list.get(list.size() - 1);
    }/*from  www  .j a  v  a 2s . c o m*/
}

Related

  1. getLast(List list)
  2. getLast(List source)
  3. getLast(List list)
  4. getLastBefore(List list)
  5. getLastDateFromTimeSeriesDeltas(Double xAxisStart, List xAxisDeltas)
  6. getLastNameIndex(List list)
  7. getLastNonNullIndex(final List list)
  8. getLastOrNull(List l)
  9. getLastOrNull(List list)