Multiple choice technology programming languages

Which of the following statements regarding HttpRequest methods are correct?

  1. 1) getHeaderNames returns an Enumeration

  2. 2) getHeaders returns a String[]

  3. 3) getHeaderValues returns a String[]

  4. 4) getIntParameter returns an int

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

The HttpServletRequest interface specifies getHeaderNames() which returns an Enumeration of String header names. Option A is correct. Option B is wrong because getHeaders(String) returns an Enumeration of String values (all values for a multi-value header), not a String array. Option C is incorrect because getHeaderValues is not a standard method (likely confused with getHeaders). Option D is wrong because there's no getIntParameter method (use getParameter() then parseInt).