java中举几个参数是(key,value)形式的方法看看,并实例化参数,谢谢
1、hashmap.put("id" , "1"); (还有其它Map)
2、json.put("type", 3);
3、response.setAttribute("code", "200")
4、urlConnection.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT; DigExt)");
5、、、、、、
平常开发中 key value 形式的方法还是能见到很多的
map和dictionary不都可以么
HashMap hashmap = new HashMap();
hashmap.put("语文" , 80.0);
map的key和value是比较常用的
map是key,value形式的
json和HashMap都是
hashmap 和hashtable 里面存的都是以键值对格式的,不过hashmap更常用,还有一些jsp中的比如session、request、response、等等都是以键值对格式存储的
还有JSP中的application对象
你去看一下Map把!(key,value)是map的存储方式。