From 3d198c09b9196b96a1d58047a1e352c90d265a7d Mon Sep 17 00:00:00 2001 From: "shuang.kou" Date: Sun, 8 Mar 2020 09:16:04 +0800 Subject: [PATCH] =?UTF-8?q?Update=20Java=E7=A8=8B=E5=BA=8F=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E9=A2=98.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\250\213\345\272\217\350\256\276\350\256\241\351\242\230.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/docs/java/Java\347\250\213\345\272\217\350\256\276\350\256\241\351\242\230.md" "b/docs/java/Java\347\250\213\345\272\217\350\256\276\350\256\241\351\242\230.md" index 6f41a9cf..5ca87c60 100644 --- "a/docs/java/Java\347\250\213\345\272\217\350\256\276\350\256\241\351\242\230.md" +++ "b/docs/java/Java\347\250\213\345\272\217\350\256\276\350\256\241\351\242\230.md" @@ -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]; -- GitLab