GeekInterview.com
Answered Questions

Can we put costructor in place of init() method . If yes how it works plz xplain in detail??

Asked By: ashish | Asked On: Nov 10th, 2006

Answered by: praveen.sakhamudi on: Feb 12th, 2007

webcontainer create an object for servlet class.for createing an object use the newInstance() method.this object automaticaly create a defaultconstructor so we can not create parametarised constructior for this object.praveen kumar sakhamudi

Answered by: sunil.yadav on: Jan 31st, 2007

constructor makes a simple object, when the container call init() on this simple object, now the simple object has become servlet which can serve the request.

Interview Question

 Ask Interview Question?

 

Career Counselling

 Have Career Question?

 Ask Chandra

 Ask Only Career questions.

Follow us: