创建一个student类,创建一个arraylist的集合,放置三个对象,并存在request中

2025-01-02 23:37:20
推荐回答(1个)
回答1:

Student s1 = new Students();
Student s2 = new Students();
Student s3 = new Students();
List();
Students.add(s1);
Students.add(s2);
Students.add(s3);
request.setAttribute("students",students);