Well while not implementing which is
thread safe.
public class First extends HttpServlet
{
String str=new String("jawwad");//1
public void doGet(HttpServletRequest req,HttpServletResponse)
{
ServletConfig config=getServletConfig();//2
String s1=config.getInitParameter("one");//3
ServletContext context=getServletContext();//4
String s2=context.getInitParameter("two");//5
}
}
Select any two.Which reference assigned is thread safe.