Multiple choice

If the request does not have a header of the specified name, which of the following HttpServletRequest methods returns - 1?

  1. getHeaderNames()

  2. getHeader(java.lang.String name)

  3. getIntHeader(java.lang.String name)

  4. containsHeader(java.lang.String name)

  5. service()

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

If the request does not have a header of the specified name, this method returns -1.