java集合类——LinkedList类
LinkedList是实现List接口。LinkedList类有很多方法,对头尾的操作都提供了方法。如addFirst(),addLast()等等。LinkedList与Stack的顺序刚好相反,是先进先出的。
[add first, 1, 2, 3, 4, add last][offer first, add first, 1, 2, 3, 4, add last, offer last][offer first, add first, 1, 2, 3, 4, add last, offer last, offer]offer first[add first, 1, 2, 3, 4, add last, offer last, offer]offer