0

I have seen in many servlets that doPost and doGet are declared public or protected.
What is the purpose of declaring a doPost or doGet as protected?
Thank you.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by stultuske
0

it basically decides who can access the method.
public -> everyone
protected -> package level and subclasses

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.