stack.java

来自「java版的数据结构的完全代码 免费提供了 学习数据结构的请下载」· Java 代码 · 共 24 行

JAVA
24
字号
// Introduced in Chapter 4/** A last-in, first-out stack. */public interface Stack<E> {  /** Return true if this Stack is empty. */  public boolean isEmpty();  /**   * Return the top item on this Stack, but do not modify the Stack.   * @throws EmptyStructureException if this Stack is empty.   */  public E peek();  /**   * Remove and return the top item on this Stack.   * @throws EmptyStructureException if this Stack is empty.   */  public E pop();  /** Add targer to the top of this Stack. */  public void push(E target);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?