2
我想列出記錄存儲區中的所有記錄。我聲明瞭一個清單:列出所有記錄j2me
Private List tlist = new List("Select One", List.IMPLICIT);
也算進去的記錄:
Form mainf;
Command exit = new Command("Exit", Command.EXIT, 0);
RecordEnumeration re = null;
int numrecords = 0;
try {
re = contactList.enumerateRecords(null, null, false);
numrecords = re.numRecords();
} catch (RecordStoreException rse) { numrecords = 0;}
現在我只需要知道如何列出一個列表中的所有記錄。
你的意思是 '而(e.hasNextElement())'? –
哦,我已經改變了。謝謝史蒂夫。 :) – bharath