package org.hanqi.array;
import java.util.HashMap;
import java.util.Map;
public class Emp {
private String key;
private String value;
public Emp(String key,String value)
{
this.key=key;
this.value=value;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static void main(String[] args)
{
Map<String, String>m=new HashMap<String, String>();
Emp emp=new Emp("001","德州扒鸡");
Emp emp2=new Emp("002","北京烤鸭");
Emp emp3=new Emp("003","绝味鸭头");
Emp emp4=new Emp("004","博山酥锅");
Emp emp5=new Emp("005","武汉热干面");
Emp emp6=new Emp("006","周村烧饼");
Emp emp7=new Emp("007","淄博烧烤");
m.put(emp.getKey(), emp.getValue());
m.put(emp2.getKey(), emp2.getValue());
m.put(emp3.getKey(), emp3.getValue());
m.put(emp4.getKey(), emp4.getValue());
m.put(emp5.getKey(), emp5.getValue());
m.put(emp6.getKey(), emp6.getValue());
m.put(emp7.getKey(), emp7.getValue());
m.remove(emp5);
for(String t:m.keySet())
{
if(t=="005")
{
m.remove(emp5);
}
else
{
System.out.println(t);
}
}
}
}