我刚开始学jsp,在书上的例子有些疑惑?麻烦大家给我解释一下,谢谢了!
<%@ page contentType="text/html;charset=GB2312" %>
<html>
<body>
<%! Integer number=new Integer(0);
%>
<%
synchronized(number)
{ int i=number.intValue();
          i++;
  number=new Integer(i);
}
%>
<p>您是第
   <%=number.intValue()%>
   个访问本站的客户.
</body>
</html>为什么synchronized内修饰的必须是Integer的实例化对象,而不能写成一个整形变量呢?
如synchronized(i)??
谢谢了!