Multiple choice

Which method returns the name of the Servlet's initialization attributes as an enumeration of String objects?

  1. getInitParameter(String name)

  2. getInitParameterNames()

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

  4. contains header(java.lang.String name)

  5. setHeader(java.lang.String name, java.lang.String value)

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

It returns the name of the Servlet's initialization attributes as an enumeration of String objects.