What is the risk of having instance variables in a servlet?

  • Instance variables are mandatory in servlets.
  • Instance variables can be accessed by multiple threads concurrently, leading to potential threading issues.
  • Instance variables increase servlet performance.
  • There is no risk.
The risk of having instance variables in a servlet is that they can be accessed by multiple threads concurrently, potentially causing threading issues.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *