Page 1 of 1

About Question enthuware.jwpv6.2.750 :

Posted: Sat May 14, 2016 7:08 pm
by himaiMinh
Hi,
I think foo can be thread safe.
It is a private instance.
There is no get method to access outside the CrazyServlet class.

Re: About Question enthuware.jwpv6.2.750 :

Posted: Sat May 14, 2016 8:29 pm
by admin
A servlet container can reuse the same servlet class instance for processing multiple requests simultaneously. So even if foo is private, multiple threads can execute the servlet's service method and access foo simulatenously.
-Paul.