作者Friendzoned (PatheticApathy)
看板java
标题[问题] Comparator无法用
时间Tue Oct 17 11:05:02 2017
如题
https://imgur.com/a/ZQ0De
Comparator 用不了
一直以来都是这样子打
请问哪里有错误?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 39.8.39.34
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/java/M.1508209505.A.8A9.html
1F:→ kyleJ: methods回传值是String 不能做大小比较? 10/17 11:47
2F:→ adrianshum: 直接return a.getUnit().compareTo(b.getUnit()); 就 10/17 19:14
3F:→ adrianshum: 好了 10/17 19:14