Can anyone please tell me what is the specific reason for having HttpServlet as an abstract class without any abstract methods?
Ajit Shanbhag
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
Because -in order to be useful- at least one of its methods (generally doGet or doPost) needs to be overridden. Making HttpServlet abstract ensures that it can't be used directly - it needs to be subclassed in order to be instantiated.