Multiple choice technology programming languages

Can we call destroy() method on servlets from service method ?

  1. Yes

  2. No

  3. May be

  4. Cant Say

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

Technically, the destroy() method of a servlet is a public method and can be invoked manually from any method, including service(). However, doing so does not unload the servlet; it only executes the logic inside the destroy method, which is generally bad practice.