Skip to content

Commit 3d198c0

Browse files
committed
Update Java程序设计题.md
1 parent 2ceb03b commit 3d198c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/java/Java程序设计题.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class MyStack {
7373

7474
//TODO:返回栈顶元素并出栈
7575
private int pop() {
76-
if (count == -1)
76+
if (count == 0)
7777
throw new IllegalArgumentException("Stack is empty.");
7878
count--;
7979
return storage[count];

0 commit comments

Comments
 (0)