stackadt.java
来自「一个普通的计算器程序」· Java 代码 · 共 28 行
JAVA
28 行
//********************************************************************// StackADT.java Authors: Lewis/Chase//// Defines the interface to a stack data structure.//********************************************************************package jss2;public interface StackADT<T>{ /** Adds one element to the top of this stack */ public void push (T element); /** Removes and returns the top element from this stack */ public T pop(); /** Returns without removing the top element of this stack */ public T peek(); /** Returns true if this stack contains no elements */ public boolean isEmpty(); /** Returns the number of elements in this stack */ public int size(); /** Returns a string representation of this stack */ public String toString();}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?