Close
« Tutorial

Spring MVC - Multi Valued Query Parameters MCQ

0/13
0 ✓
0 ✗

1. What is a multi-valued query parameter in a URL?

2. Which URL has a multi-valued query parameter?

3. Which Spring MVC annotation is used to map query parameters, including multi-valued ones, to handler method parameters?

4. Which handler method parameter types can hold all the values of a multi-valued query parameter?

5. Which handler method parameter correctly receives all values of x from /test?x=a&x=b?

6. For the URL /test?x=a&x=b&x=c, what does a List parameter mapped to x contain?

7. Can the elements of the array or list be of a type other than String?

8. A handler method has this parameter. The URL is /test?id=1&id=2. What happens to the values?

@RequestParam("id") int[] ids

9. In @RequestParam("x"), what does "x" refer to?

10. Which Spring type can hold all query parameters together, where each name maps to a list of values?

11. When @RequestParam is used with a MultiValueMap parameter, what does the map contain?

12. In a MultiValueMap that holds query parameters, what type of object do you get when you read the values of one parameter name?

Join