InterviewSolution
| 1. |
Is Possible To Have A Constructor For A Servlet? |
|
Answer» Yes, it is possible to have a constructor for a SERVLET. However, it is not practiced usually. The operations with the constructor can be performed as usual just that it cannot be called explicitly using the ‘new’ keyword. This is implicitly HANDLED by the servlet CONTAINER. THUS, the container performs initialization as well as constructor FUNCTIONS. Yes, it is possible to have a constructor for a servlet. However, it is not practiced usually. The operations with the constructor can be performed as usual just that it cannot be called explicitly using the ‘new’ keyword. This is implicitly handled by the servlet container. Thus, the container performs initialization as well as constructor functions. |
|