• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why is HttpServlet abstract although it does not have any abstract method

 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does not seem to have any abstract method, then why is it made abstract?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the javadocs state: "A subclass of HttpServlet must override at least one method". The reason is that the class doesn't do anything useful as it is; thus it's good to prevent accidental use of it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic