search
Login

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

0 votes
26 views
asked Guru 27.1k points 31 47 92

1 Answer

0 votes
A web container creates a servlet class  object by calling the newInstance() method .
NewInstance() method checks for the fallowing 
a)A class is public or not
b)A class contain default constructor not.
If we write only parameterized constructer in a servlet then it does’t contain a default constructor then the program will not be executed.
If we write a parameterized constructor and default constructor then servlet is valid  and it’s object is created by the web container by calling the newInstance() 
 
answered Guru 24.6k points 29 51 75

Related questions

0 votes
1 answer 35 views
35 views
asked smith Geek 15.3k points 14 39 58
0 votes
1 answer 5 views
5 views
asked john Guru 27.1k points 31 47 92
0 votes
1 answer 17 views
17 views
asked keem Expert 13.2k points 26 40 57
0 votes
1 answer 1.6K views
0 votes
1 answer 34 views
...