HTTPServletRequest getParameterMap() vs getParameterNames
问题 HTTPServletRequest req, has a method getParameterMap() but, the values return a String[] instead of String , for post data as name=Marry&lastName=John&Age=20. I see in the post data it's not an array, but getParameterMap() returns array for every key(name or lastName or Age). Any pointers on understanding this in a better way? The code is available in Approach 2. Approach 1 works completely fine. Approach 1: Enumeration<String> parameterNames = req.getParameterNames(); while (parameterNames