Multiple choice technology programming languages

In the init(ServletConfig) method of Servlet life cycle, what method can be used to access the ServletConfig object ?

  1. getServletInfo()

  2. getInitParameters()

  3. getServletConfig()

  4. None

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

The GenericServlet class implements Servlet and provides getServletConfig() to retrieve the ServletConfig object passed to the init(ServletConfig) method. getServletInfo() returns descriptive text, and getInitParameters() does not exist directly with that name on GenericServlet.