楼上差不多都对你说了,定义个arraylist的student泛型。你可以从网上找个简单的例子看看,应该能看懂,后面你应该还要连数据库吧,也可以顺便把jdbc的内容看看
你都说出来用链表了。。。。就用链表ArrayList<Student> 这个来实现就OK了,具体的操作它的一些方法直接百度看看就会使用了,也有实例。
[quote=引用 9楼stacksoverflow 的回复:][quote=引用 8 楼 as821621435 的回复:] [quote=引用 7楼stacksoverflow 的回复:][quote=引用 6 楼 as821621435 的回复:] [quote=引用 4楼stacksoverflow 的回复:] Student student = new Student(); List<Student> studentList = new LinkedList<Student>(); studentList.add(student);
[quote=引用 8 楼 as821621435 的回复:] [quote=引用 7楼stacksoverflow 的回复:][quote=引用 6 楼 as821621435 的回复:] [quote=引用 4楼stacksoverflow 的回复:] Student student = new Student(); List<Student> studentList = new LinkedList<Student>(); studentList.add(student);
[quote=引用 7楼stacksoverflow 的回复:][quote=引用 6 楼 as821621435 的回复:] [quote=引用 4楼stacksoverflow 的回复:] Student student = new Student(); List<Student> studentList = new LinkedList<Student>(); studentList.add(student);
[quote=引用 6 楼 as821621435 的回复:] [quote=引用 4楼stacksoverflow 的回复:] Student student = new Student(); List<Student> studentList = new LinkedList<Student>(); studentList.add(student);
Student student = new Student(); List<Student> studentList = new LinkedList<Student>(); studentList.add(student);
[quote=引用 4楼stacksoverflow 的回复:] Student student = new Student(); List<Student> studentList = new LinkedList<Student>(); studentList.add(student);
ArrayList
62,614
社区成员
307,326
社区内容
加载中
试试用AI创作助手写篇文章吧