NoSuchElementException abnormal problem
@author:Jingdai
@date:2020.10.11
Today brush LeetCode encountered
NoSuchElementException
problems, look for a long time found to be empty because of a linked list ofgetFirst()
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 throwNoSuchElementException
an exception.