Java中的 static List<Student> students=new ArrayLis

Java中的 static List<Student> students=new ArrayList<Student>();是什么方法,表示什么意思??

定义了一个类变量,它是一个集合,并初始化为ArrayList类型,集合保存的是Student对象,<Student>这是泛型用法,这样在其他地方给students添加内容时只能添加Student对象
温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-02-19
就是定义了一个静态变量 ArrayList 这个list里面能放的类型就是Student
第2个回答  2014-02-19
这是一个List表单的定义,list表单中存放的是Student的对象这个表单使用ArrayList来构造的本回答被提问者采纳
相似回答