1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-20 22:17:09 +08:00

Update Java程序设计题.md

This commit is contained in:
shuang.kou 2020-03-08 09:16:04 +08:00
parent 2ceb03b1ab
commit 3d198c09b9

View File

@ -73,7 +73,7 @@ public class MyStack {
//TODO返回栈顶元素并出栈
private int pop() {
if (count == -1)
if (count == 0)
throw new IllegalArgumentException("Stack is empty.");
count--;
return storage[count];