java程序设计习题答案(清华大学出版杜)张思民版_1-12章答案全.doc
还剩
104页未读,
继续阅读
下载文档到电脑,马上远离加班熬夜!
亲,很抱歉,此页已超出免费预览范围啦!
如果喜欢就下载吧,价低环保!
内容要点:
105}if(command == CMD_INFO){String temp = "";temp += "The current RecordStore have" + rs.getRecordCounts() + "records";StringItem ss = new StringItem("RecordStore information\n",temp);note.deleteAll()104status = 3;dp.setCurrent(note);}if(command == CMD_OK){Alert a = new Alert("");if(status == 0){TelBook my = new TelBook();my.setTel(mContent.getString());my.setName(mSubject.getString());int id = rs103CMD_INFO = new Command("Recode Store Information",Command.EXIT,1);CMD_OK = new Command("Ok",Command.OK,1);CMD_CANCEL = new Command("Cancel",Command.CANCEL,1);note.addCommand(CMD_CANCEL);note.addCom102try {return rs.getNumRecords();} catch (RecordStoreNotOpenException e) {e.printStackTrace();}return -1;}public void Close(){try {rs.closeRecordStore();} catch (RecordStoreException e) {e.printStack101try {rs = RecordStore.openRecordStore("Pref",true);} catch (RecordStoreException e) {e.printStackTrace();}}public int addRecord(TelBook mn){int re = -1;try {re = rs.addRecord(mn.toByteArray(),0,mn.100}public void setName(String name) {this.name = name;}public String getTel() {return tel;}public void setTel(String tel) {this.tel = tel;}public byte[] toByteArray(){byte[] data = null;ByteArrayOutp99super();tb = new TextBox("信息公告","",200, TextField.ANY);}protected void startApp() throws MIDletStateChangeException {dp = Display.getDisplay(this);tb.setTicker(new Ticker("今天全校停课,哈哈!"));tb.setString98import javax.microedition.midlet.*;public class InfoTest extends MIDlet{ private Display display;public InfoTest(){ display=Display.getDisplay(this);}protected void startApp(){Alert alert =new Alert
发表评论
暂无评论,赶快抢占沙发吧。