public HashMap<String, String> testMap = new HashMap<String, String>();
/**
* @Description: 向Map里面放入数据
* @date 2011-6-7 下午03:35:01
* @param
* @author LiYaoHua
* @return Map<String,String> 返回类型
* @throws
*/
public Map<String, String> testSetMapValue(){
testMap.put("1", "北京");
testMap.put("2", "上海");
testMap.put("3", "香港");
return testMap;
}
Flex代码:在Flex中这样取其中obj 即是Java返回的Map
//输出格式为key:value
for (var itemName:Object in obj){
trace(itemName+":"+obj[itemName])
}
//输出的只是value
for each(var itemValue:Object in obj){
trace(itemValue.toString())
}
最新评论