Implements Comparable to get alphabetical sort with Strings

后端 未结 4 2268
你的背包
你的背包 2021-02-20 14:04

I would like an object to be comparable (to use it in a TreeSet in that case).

My object got a name field and I would like it to be sorted by alphabetical order.

4条回答
提交回复
热议问题