To avoid thread safety issues, it's recommended to use __________ instead of instance variables in servlets.
- final variables
- global variables
- local variables
- static variables
Using static variables is recommended in servlets to avoid thread safety issues, as they are shared among all instances of the servlet and are stored in a shared memory space.
Loading...
Related Quiz
- In caching strategies, what is meant by 'cache warming'?
- In an MVC-based web application, where do servlets generally fit in?
- In caching, __________ refers to the technique of dynamically adjusting the cache size based on current system load.
- Why is it important to close resources like database connections in servlets?
- What is two-phase commit protocol in the context of transaction management?