<%
request.setCharacterEncoding("GBK") ;
if(request.getParameter("content")!=null){
// 说话的全部内容应该保存在application
// application中存在一个集合用于保存所有说话的内容
List all = null ;
all = (List)getServletContext().getAttribute("notes") ;
// 程序必须考虑是否是第一次运行
if(all==null){
all = new ArrayList() ; // 里面没有集合,所以重新实例化
}
all.add(request.getParameter("content")) ;
// 将修改后的集合重新放回到application之中
getServletContext().setAttribute("notes",all) ;
}
%>
然后我自己小改了一下,以为是不能通过的,实际却通过了  if(request.getParameter("content")!=null)
   {    List all;
   all=(List)application.getAttribute("notes");
       all.add(request.getParameter("content"));
       application.setAttribute("notes",all);
   }
我的疑问是,list接口不能实化,为什么我自己的代码里没有用arraylist实例化也能用?