iany
发贴: 3
积分: 0
|
于 2004-07-23 05:14
Given 11 public class Acct extends HttpServlet { 12 public StringBuffer foo = new StringBuffer("foo"); 13 public void doPost(HttpServletRequest req, HttpServletResponse resp){ 14 ServletConfig config = getServletConfig(); 15 String param1 = config.getInitParameter("param1"); 16 ServletContext context = getServletContext(); 17 Object obj = context.getAttribute("OBJ"); } } Which two variables reference objects that are thread-safe?(Choose two) A obj at line 17 B foo at line 12 C config at line 14 D param1 at line 15 E context in line 16 Answer C D Why E is incorrect?
|