关于comparable和comparator 本帖最后由 xyy001 于 2009-06-15 14:21:00 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你这不是已经实现了吗?SortedSet <Item> sortByDescription = new TreeSet <Item>(new Comparator <Item>() { public int compare(Item a, Item b) { String descrA = a.getDescription(); String descrB = b.getDescription(); return descrA.compareTo(descrB); } }); java实现三个线程间通信 java中for的语法问题 请问:输出1-100之内的奇数,麻烦看这个程序,为什么不对呢? 就是我有个mail收发程序,要求在windows,linux,unix上都能作为系统服务使用。就是说在用户登陆之前就在运行了,怎么做啊 特急,在线求教,awt类异常,高人请进,帮帮小弟哈~~~~ 请问对原始对象引用的问题 关于JNI的问题....看到此贴者必须回贴(水贴可矣),违者斩立决... 关于包!!java.swing是什么? 初学者的第一个实验就失败了,学习的劲头强烈受挫,大家还是帮帮忙吧 菜鸟问题,谢谢帮助 j2se 求助了,谢谢各位!
Comparator <Item>()
{
public int compare(Item a, Item b)
{
String descrA = a.getDescription();
String descrB = b.getDescription();
return descrA.compareTo(descrB);
}
});