LinkedList的addFirst是加在队头,后进先出,和栈类似。 addLast是加在队尾,先进先出,和队列类似.add方法与addLast类似,但返回值不同。
LinkedList
addFirst
addLast
add