import java.util.Collections;
import java.util.List;
import java.util.ArrayList;
public class Test {
public static void main(String[] args) {
List<Student> str = new ArrayList<Student>();
str.add(new Student(101, "aaa"));
str.add(new Student(104, "bbb"));
str.add(new Student(103, "ccc"));
str.add(new Student(105, "ddd"));
str.add(new Student(104, "eee"));
str.add(new Student(102, "fff"));
Collections.sort(str);
for(Student student : str) {
System.out.println(student);
}
}
}