delete(@RequestBody"/> delete(@RequestBody">

Home  >  Article  >  Java  >  Detailed explanation of how java map obtains values

Detailed explanation of how java map obtains values

怪我咯
怪我咯Original
2017-06-25 10:11:512766browse

1. Create an iterator

2.While loop to take out the value

3.Use get to get the value

/**
* Delete
* @param reqmap
* @return
*/
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public Map delete(@RequestBody Map reqmap){
System .out.println("Received data"+reqmap);

Map map = new HashMap();

Iterator iterator = reqmap.keySet().iterator();

while(iterator.hasNext()){
Object key = iterator.next();
System.out.println(reqmap.get( key));
}

map.put("msg", "Delete successfully");

return map;

}

The above is the detailed content of Detailed explanation of how java map obtains values. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn