J2ME的类方面的问题

CarelessWishper 2009-05-11 04:38:23
请问各位大侠,我在书上看到了这样的一个类
public class Index {
private String key;//这里的KEY就是name
private int recordID;
public Index(){}
public void setKey(String key){
this.key=key;
}
public void setRecordID(int recordID){
this.recordID=recordID;
}
public byte[]serilize()throws IOException{
ByteArrayOutputStream baos=new ByteArrayOutputStream();
DataOutputStream dos=new DataOutputStream(baos);
dos.writeUTF(key);
dos.writeInt(recordID);
dos.close();
baos.close();
return baos.toByteArray();
}
public Index deserilize(byte[] data) throws IOException{
ByteArrayInputStream bais=new ByteArrayInputStream(data);
DataInputStream dis=new DataInputStream(bais);
Index index=new Index();
index.key=dis.readUTF();
index.recordID=dis.readInt();
dis.close();
bais.close();
return index;

}
}
然后在一个方法看到了
public Index[] searchIndex(String key){}
这里的 Index[]是指的什么啊?
...全文
33 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
CarelessWishper 2009-05-11
  • 打赏
  • 举报
回复
喔喔 刚刚遇到高人了 理解清楚了 不过还是谢谢哈!^_^
JarodYv 2009-05-11
  • 打赏
  • 举报
回复
Index对象的数组

13,100

社区成员

发帖
与我相关
我的任务
社区描述
Java J2ME
社区管理员
  • J2ME社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧