Java中的栈操作 java中常用的栈操作 top赋初值是-1,入栈先做top++,出栈先赋值后top– 如图: 示例代码:public interface IStack { void push(Object obj) throws Exception; Object pop() throws Exception; boolean isEmpty();}```接口的实现public cla java 2023-10-01 43 点赞 0 评论 65 浏览