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-04 13:46:07 +08:00
parent f5afdf320f
commit f13050ff4a

View File

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