NoSuchElementException abnormal problem

NoSuchElementException abnormal problem

@author:Jingdai
@date:2020.10.11

Today brush LeetCode encountered NoSuchElementExceptionproblems, look for a long time found to be empty because of a linked list of getFirst()operations caused by the current record it.

View Java API call to find the empty list getFirst(), getLast(), removeFirst(), removeLast(), element(), remove(), pop()when the method will throw NoSuchElementExceptionan exception.

Guess you like

Origin blog.csdn.net/qq_41512783/article/details/109007982