作业中有如下一步要求:
Add functionality to your classes that would allow them to be sorted by name with the Collections.sort method.
之后还要求输出
Create a method called print that would take your collection and list all of the contents. It should handle all of your classes. You should also demonstrate the Collections.sort method.
网上了解到collection是一个集合的接口, 那么class也可以作为一个集合? 向内部添加不同的classes并支持排序??
如果可以, 该如何创建一个class的集合呢?求教