栈中的方法peek()和pop()

stack1.peek() 返回栈顶元素,但不在堆栈中删除它。
Stack2.pop() 返回栈顶元素,并在堆栈中删除它。

原文地址:https://www.cnblogs.com/shiheyuanfang/p/13353807.html