加分帖子! 重赏之下 必定有勇夫! 加100分。

ddl555178554 2010-11-18 07:57:19
随把我的那个帖子 解决了,这个帖子的100分也拿走,正在线 可马上结帖子。 一共200分。
...全文
220 26 打赏 收藏 转发到动态 举报
写回复
用AI写文章
26 条回复
切换为时间正序
请发表友善的回复…
发表回复
凉岑玉 2010-11-19
  • 打赏
  • 举报
回复
import java.util.*;

public class ListHome {





public static void main(String args[])
{

ArrayList<Integer> arrayList=new ArrayList<Integer>();
arrayList.add(1);
arrayList.add(2);
arrayList.add(3);
arrayList.add(4);
Collections.sort(arrayList);
}
}



我两个帖子都回了··给多少分?
heyi10014 2010-11-19
  • 打赏
  • 举报
回复
哇塞,这么多。。。。
糖牙 2010-11-19
  • 打赏
  • 举报
回复
import java.util.*;

public class ListHome {

public static void main(String args[]) {
ArrayList<String> arrayList = new ArrayList<String>();
arrayList.add("aa");
arrayList.add("cc");
arrayList.add("dd");
arrayList.add("aaa");
//升序
Collections.sort(arrayList);

//降序
Collections.reverse(arrayList);


for(int i=0;i<arrayList.size();i++)
{
System.out.println(arrayList.get(i));
}
}
}

帮lz找到2帖子,不知是否有用
http://blog.csdn.net/wgw335363240/archive/2010/05/13/5587325.aspx
http://blog.csdn.net/wgw335363240/archive/2010/05/15/5595084.aspx
别人家的老公 2010-11-19
  • 打赏
  • 举报
回复
结贴率 0% 你一分都别想拿
djvfe 2010-11-19
  • 打赏
  • 举报
回复
import java.util.*;    public class ListHome {  	      	
public static void main(String args[]) {
ArrayList <Integer> arrayList=new ArrayList <Integer>();
arrayList.add(1);
arrayList.add(2);
arrayList.add(3);
arrayList.add(4);
Collections.sort(List <Integer> arrayList,new Comparator() {
public int compare(Object o1, Object o2) {
return (Integer)o2-(Integer)o1
}
});
}
}
Jlins 2010-11-19
  • 打赏
  • 举报
回复
下面就可以实现 自己写比较器就行了 ,代码如下
[Quote=引用 21 楼 john_sheep 的回复:]



Java code



import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;

public class……
[/Quote]
caofaping 2010-11-19
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 pengranxiang 的回复:]
我只拿十分。。
[/Quote]
我也一样,不多,呵呵
pengranxiang 2010-11-19
  • 打赏
  • 举报
回复
我只拿十分。。
sion 2010-11-19
  • 打赏
  • 举报
回复
由于我现在的身子是躺着的
所以就懒得敲代码了
cs_winnerchen 2010-11-19
  • 打赏
  • 举报
回复
那还等什么,接分都是了。
酒剑仙 2010-11-19
  • 打赏
  • 举报
回复
呵呵!楼主厉害!
约翰羊 2010-11-19
  • 打赏
  • 举报
回复
这一百分的效果就是不一样啊。
specialco 2010-11-19
  • 打赏
  • 举报
回复
看我这个帖子 是不是符合要求
http://topic.csdn.net/u/20101119/00/3a57470f-7b78-4eb2-877c-35eebac6951e.html?63499
不要引号就用捕获组,要引号就更简单了
lingxuch 2010-11-19
  • 打赏
  • 举报
回复
楼主看看我给的解决方案是否可行,在你那个贴子上,如果我没理解错你的意思的话方案肯定是可以的
ddl555178554 2010-11-18
  • 打赏
  • 举报
回复
帮我做一下 200分给你
约翰羊 2010-11-18
  • 打赏
  • 举报
回复
回个贴,拿10分走人
ddl555178554 2010-11-18
  • 打赏
  • 举报
回复
这个帖子 也有100分啊

62,623

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧