User user=new User();
user.setName("袁冻");
user.setAge(1);
User user1=new User();
user1.setName("李好");
user1.setAge(2);
User user2=new User();
user2.setName("陈馨");
user2.setAge(3);
List<User> list=new ArrayList();
list.add(user0);
list.add(user1);
list.add(user2);
request.setAttribute("list",list);
<c:set var="startIndex" value="${fn:length(list)-1 }"></c:set>
<c:out value="${startIndex}"></c:out>
<c:forEach var="i" begin="0" end="${list.size()}" varStatus="status">
<c:out value="${list[startIndex-status.index].age}"></c:out>
</c:forEach>
index是从0开始的,count才是从1开始的,课程讲的加上了begin="1",所以输出的index从1开始