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

Detailed explanation of how java map obtains values

怪我咯
Release: 2017-06-25 10:11:51
Original
2815 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template