Can we define constructor in Servlet class?

Answer Posted / sitaram

in java, we can access any class, first JVM search the any
type(with or with out parameters) constructor. if it their
the same constructor will be calling other wise JVM create
the default constructor for that class.

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the difference between session and cookies in servlet? Explain

566


Differentiate between the print writer and servlet output stream?

565


What is a generic servlet?

522


What are all the ways for session tracking?

594


Why do we use sendredirect() method?

550






What is servlet lazy loading?

697


Which interface should be implemented by all servlets?

702


Tell us something about servletconfig interface.

584


Which application server is best for java?

560


How to create war file?

618


What are different methods of session management in servlets?

780


How to commuincate between an applet and a servlet?

592


Why is httpservlet declared abstract?

582


How to upload a file to the server using servlet?

533


What is servlet in web technology?

577