Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
State true or false: - Can the constructor be used instead of init () to initialize a Servlet
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.
Related Answered Questions
Related Open Questions