1、初始化 Stack stack=new Stack 2、判断栈是否为空 stack.empty() 3、取栈顶值 stack.peek() 4、进栈 stack.push(Object); 5、出栈 stack.pop();