Multiple choice general knowledge science & technology

Which of the following are life cycle methods of servlets?

  1. close

  2. init

  3. destroy

  4. service

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

The servlet lifecycle has three core methods defined in the Servlet interface: init() (called once during initialization), service() (called for each request to process client requests), and destroy() (called once before removal). These methods manage the servlet's creation, request handling, and cleanup. The close() method is not part of the standard servlet API.