java课设答案清华大学出版_java程序设计习题答案(清华大学出版杜)张思民版_1-12章答案全.doc...

这篇文档提供了《java程序设计》(清华大学出版杜张思民版)1-12章的全部习题解答,包括RecordStore操作的实例,涵盖了数据存储和管理的内容。用户可以下载文档以获取完整内容,解决课设中的疑问。
摘要由CSDN通过智能技术生成

java程序设计习题答案(清华大学出版杜)张思民版_1-12章答案全.doc

ff4e8c52fa8a319404916fe48fcf26dc.gif

还剩

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

发表评论

暂无评论,赶快抢占沙发吧。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值