• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why this statement is correct?

 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the service(ServletRequest, ServletResponse) method is overridden, it cannot be made protected.

Well the reason given in Enthuware is
Because it is declared in an interface [javax.servlet.Servlet] and all interface methods are public. You cannot reduce the accessibility of an overriding or implementing method.
 
Ramesh Ponnada
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this thread :

Overridden Methods
 
Amandeep Singh
Ranch Hand
Posts: 850
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ramesh, you are great...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic