• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why this statement is correct?  RSS feed

 
Amandeep Singh
Ranch Hand
Posts: 853
  • 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: 853
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ramesh, you are great...
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!