Can we define constructor in Servlet class?

Answer Posted / naveen

yes we can create a constructor
by default JVM calls default constructor.In addition to that if write both default and parameterized constructor then JVM call default one and then parameterized one

hence the ans is yes we hav to write two constuctors
no if write our own constructor one itself

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are important features of Servlet 3?

599


Write a hello world program using servlets.

593


What is the difference between the http servlet and generic servlet?

603


What are the advantages of cookies?

632


What do you mean by the servlet chaining?

549






What is the use of servlet context?

537


What is called servlet container?

667


What are the important functions of filters?

601


What are the key methods that are involved in processing of http servlets?

626


Is that servlet is pure java object or not?

644


What’s the use of the servlet wrapper classes??

644


Describe some assignments that are executed by servlet container?

587


What is httpservlet class?

542


Difference between java beans & servlets?

590


What do you mean by deployment descriptor?

557