package com.niit.www;
public class Record {
private int id;
private String name;
private String telephone;
private String remark;
public Record(int id, String name, String telephone, String remark) {
super();
this.id = id;
this.name = name;
this.telephone = telephone;
this.remark = remark;
}
public Record()
{}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
Hashtable hashTable=new Hashtable();
Record re=new Record(1001,"jack","15165800700","chinese");
Record re1=new Record(1002,"mike","15168421155","American");
Record re2=new Record(1003,"rose","0154-8556","European");
hashTable.put("1", re);
hashTable.put("2", re1);
hashTable.put("3", re2);
}
我想用一个for循环遍历 hashTable的 values值
用了Enunmeration Entry KeySet都搞不定。。
谁指点下小弟啊。。。。