Topic: 新手求解~! |
Print this page |
1.新手求解~! | Copy to clipboard |
Posted by: sealsealseal Posted on: 2006-03-23 21:28 使用StringBuffer类,構建字符堆棧 public class CharStack{ private StringBuffer stack; public CharStack(){ stack =new StringBuffer(); } public CharStack(int capacity){ stack=new StringBuffer(capacity); } public void push(char c){ //插入代碼 } public int pop(){ //插入代碼 } public char[] list(){ //插入代碼 } public String toString(){ //插入代碼 } } 另求:數字堆棧与字符串堆棧的匹別 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |