Files

9 lines
519 B
Plaintext

removeFirst() on an empty list, 2015 version and this module
============================================================
2015 list holding the value 0: removeFirst() returned 0
2015 list that is empty: removeFirst() returned 0 (and printed: List is empty - nothing to remove)
A caller that only looks at the return value cannot tell these two cases apart.
this module, list holding 0: removeFirst() returned 0
this module, now empty: removeFirst() throws NoSuchElementException: list is empty