Multiple choice

Which of the following HttpServletRequest methods returns an empty enumeration object, if the request did not include any headers of the specified name?

  1. getHeaderNames()

  2. addHeader(java.lang.String name,java.lang.String value)

  3. containsHeader(java.lang.String name)

  4. getHeaders(java.lang.String name)

  5. destroy()

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

If the request did not include any headers of the specified name, this method returns an empty enumeration object.