为什么需要Comparator?我们来看一个简单的例子,理解为什么需要它,假设我们有一个Student类,我们想根据学生的年龄进行排序,classStudent{privateStringname;privateint...