分类: Java
2008-03-05 22:42:27
|
BracketChecker.java
|
测试程序:
BracketsApp.java
|
chinaunix网友2008-04-02 15:47:26
package zieckey.datastructure.study.stack; public class StackChar { private int maxSize; // size of stack array private char[] stackArray; private int top; // top of stack public StackChar( int maxSize ) { this.maxSize = maxSize;// 设置数组大小 stackArray = new char[maxSize];// 创建数组 top = -1;// 还没有任何元素 } public void push( char ch ) {// 入栈 if ( isFull( ) ) { S
chinaunix网友2008-04-02 15:46:24
package zieckey.datastructure.study.stack; public class StackChar { private int maxSize; // size of stack array private char[] stackArray; private int top; // top of stack public StackChar( int maxSize ) { this.maxSize = maxSize;// 设置数组大小 stackArray = new char[maxSize];// 创建数组 top = -1;// 还没有任何元素 } public void push( char ch ) {// 入栈 if ( isFull( ) ) { S