This repository was archived by the owner on Jan 26, 2023. It is now read-only.
peek() in MoveStack class #38
Answered
by
Derppening
MeteorTony
asked this question in
Q&A
-
|
Why it is labeled with "NotNull"? What if the stack is empty? So supposed it could return null or throw an exception? |
Beta Was this translation helpful? Give feedback.
Answered by
Derppening
Oct 2, 2021
Replies: 1 comment
-
|
Throw an exception. I don't expect you to call that method knowing that the stack is empty. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
MeteorTony
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Throw an exception. I don't expect you to call that method knowing that the stack is empty.