实例化 Stack stack=new Stack(); 判断是否为空 stack.empty() 取栈顶值(不出栈) stack.peek() 进栈 stack.push(Object); 出栈 stack.pop();