import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
public class demo {
public static void main(String[] args) {
Map<String,String> m = new HashMap<>();
m.put("路凡","JSP");
m.put("fuck","JSP");
m.put("aaa","JSP");
m.put("cccc","JSP");
m.put("张三","JDBC");
m.put("Lucy","Java高级编程应用");
m.put("Allen","JDBC");
boolean keyResult = m.containsKey("Lucy");
if(keyResult)
{
m.put("Lucy","Corejava");
}
Set<Map.Entry<String,String>> entries = m.entrySet();
for(Map.Entry<String,String> entry : entries){
String key = entry.getKey();
String value = entry.getValue();
System.out.println(key+"="+value);
}
for (String key : m.keySet()) {
// System.out.println(key);
String value = m.get(key);
if(value.equals("JSP")){
System.out.println(key);
}
}
}
}