JAVA Linkedlist易混淆的方法

来源:互联网 发布:单反相机 知乎 编辑:程序博客网 时间:2024/06/05 18:15

Returning null + removing operations: poll()pollFirst().

Returning null + not removing operations: peek()peekFirst().

Throwing exception + removing operations: pop()remove()removeFirst().

Throwing exception + not removing operations: element()getFirst().

参考http://stackoverflow.com/questions/14851367/java-linkedlist-differences-between-retrieve-operations

0 0
原创粉丝点击