问题描述
- 这个问题怎么解决??
-
已知如下的类TestPara:
inport java.util.*
inport java.io.*
inport javax.servlet.*
inport javax.servlet.http.*public class TestPara extends HttpServlet{
int para=0 ;
protected void doPost(HttpServletRequest request,HttpServletResponse response)throws
java.io.I0Exception,javax.servlet.ServletException{
doGet(request,response);
}protected void doGet(HttpServletRequest request,HttpServletResponse response)throws
java.io.I0Exception,javax.servlet.ServletException{
response.setContentType(“test/html”);
try{
para ++ ;
PrintStream out=new PrintStream(response,getOutputStream());
out.println(“”+ para) ;
out.flush();
out.close();
}catch(Exception e){}
}
}在客户机A的浏览器中调用该类后,在客户机B的浏览中调用该类,然后关掉A的浏览器后再次打开,重新调用该类,
请写出3次调用的输出值?
时间: 2024-10-30 14:20:40