• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between two versions of doGet() method

 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have read two version of doGet() methods
One is


Second is


I am not able to find any scenario where my web application will behaves differently if i specifically use one version of this method and do not use another version.

Please tell me if there is any such scenario

Thanks
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether you implement the doGet method as public or protected will not make any difference.

But remember that you cannot have two doGet methods, one with public and one with protected visibility...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic