LinkedList 注意事项

 


  public E getFirst() 返回此列表的第一个元素。
  public E getLast()   返回此列表的最后一个元素。
  public E removeFirst() 移除并返回此列表的第一个元素。
  public E removeLast()


  
public E element()    获取但不移除此列表的头(第一个元素)。



带有index 索引的 操作会抛出
IndexOutOfBoundsException - 如果索引超出范围 (index < 0 || index >= size())

public E get(int index)     返回此列表中指定位置处的元素。
public E set(int index, E element)     元素替换 



 




















原文地址:https://www.cnblogs.com/chengbao/p/5300904.html