State true or false: - Can the constructor be used instead of init () to initialize a Servlet

Skill/Topic: Servlets
A) True
B) False
Explanation: But you shouldn’t. The original reason for init() was that ancient versions of Java couldn’t dynamically invoke constructors with arguments, so there was no way to give the constructor a ServletConfig. That no longer applies, but Servlet containers still will only call your no-arg constructor. So you won’t have access to a ServletConfig or ServletContext.

Showing Answers 1 - 1 of 1 Answers

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions