JAVA中通过List实现学生成绩名次排名
前端收藏 6年前 (2018-07-25) 2164浏览
假如我有一个 List<Student> s,Student 有三个属性:name(名字),score(分数),rank(名次)。 我该怎么样根据 score 的大小给每个 s 的每一个 Student 进行排名(不排序,只是确定名次),...
前端收藏 6年前 (2018-07-25) 2164浏览
假如我有一个 List<Student> s,Student 有三个属性:name(名字),score(分数),rank(名次)。 我该怎么样根据 score 的大小给每个 s 的每一个 Student 进行排名(不排序,只是确定名次),...