I am very confused. Why the HttpServlet class is an abstract? And what is the basic difference between bean and pojo?
Why would HttpServlet
not be abstract? An instance of just HttpServlet
would be useless - the whole point of a servlet is to be able to provide useful responses to requests, and HttpServlet
can't do that. It's generally a good idea to prevent useless situations where possible.
As another example of something similar, consider MouseAdapter
. That's abstract despite having no abstract methods, because it's useless until you override at least one method.
See more on this question at Stackoverflow