Hi,
Please calrify my doubt for the below example.
public class MyServlet extends HttpServlet implements SingleThreadModel
{
private
String strName;
public void doGet(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException {
}
}
In the above example is the instance variable "strName" is
thread safe for not?.
In my view "strName" is Thread safe, the reason being that private variables are not shared by mutiple instances.
The reason why iam asking is that i took two mock exams, in one of the mock exam it is not thread safe whereas in another mock exam it has been given as thread safe.
regards
S.Karthikeyan