A servlet implements Single Thread model public class BasicServlet extends HttpServlet implements SingleThreadModel { int number = 0; public void service(HttpServletRequest req, HttpServletResponse res) { } } Which is thread safe ?
A. Only the variable num
B. Only the HttpServletRequest object req
C. Both the variable num & the HttpServletRequest object req
Ans: B
B. Only the HttpServletRequest object req
C. Both the variable num & the HttpServletRequest object req
Ans: B
Post a Comment