Can we define constructor in Servlet class?

Answer Posted / komal singh adhikari

YES,
we can initialized the default constructor.

but we cannot call the parameterized one.

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use the constructor, instead of init(), to initialize servlet?

825


What is servlet and its advantages?

764


What is the difference between Difference between doGet() and doPost()?

970


If some new data has entered the database, explain how can a servlet refresh automatically?

984


Can you explain in detail 'javax.servlet' package?

754


Difference between get and post in java servlets?

754


What methodology can be followed to store more number of objects in a remote server?

2013


What is the workflow of a servlet?

892


What do you understand by mime type?

785


Explain the difference between jsp and servlet?

771


What are all the ways for session tracking?

822


What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?

830


Can we use threads in Servlets?

841


What do you mean by chaining in servlet?

778


Whether thread can be used in servlets?

936