mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-20 22:17:09 +08:00
Update Java程序设计题.md
This commit is contained in:
parent
f5afdf320f
commit
f13050ff4a
@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user