Multiple choice technology web technology

Explain the life cycle methods of a Servlet?

  1. init(ServletConfig config)

  2. service( ServletRequest req, ServletResponse res)

  3. destroy( ServletRequest req, ServletResponse res)

  4. destroy()

Reveal answer Fill a bubble to check yourself
A,B,D Correct answer
Explanation

Servlet lifecycle has three key methods: init() for initialization (receives ServletConfig), service() for handling requests (receives request/response objects), and destroy() for cleanup (no parameters). Option C incorrectly shows destroy() with request/response parameters.