摘要: 使用Collections.sort(qlist, new Comparator(){ public int compare(UserInfo o1, UserInfo o2) { if(!o1.getResult().equals("0000") && o2.getResult().... 阅读全文
posted @ 2013-07-01 14:54 冰雪柔情的天空 阅读(254) 评论(0) 推荐(0) 编辑
摘要: public class PassValue { /** * 值传递 基本数据类型参数 * 值传递:方法调用时,实际参数吧他的值传递给对应的形式参数,方法执行中形式参数值的改变不影响实际参数的值 */ static void exchage(int a,int b){//静态方法,交换a,b的值 int temp; temp =a; a=b; b=temp; } public static void main(String[] args) { /** int i =10; int j =100; System.out.println("befeore call:"... 阅读全文
posted @ 2013-07-01 14:32 冰雪柔情的天空 阅读(176) 评论(0) 推荐(0) 编辑
摘要: import java.util.Arrays;import java.util.*;public class Sort { /** * 插入排序 */ public static void insertSort(){ int a[]={49,38,65,97,76,13,27,49,78,34,12,64,5,4,62,99,98,54,56,17,18,23,34,15,35,25,53,51}; int temp =0; for(int i =1;i=0&&temp=0&&tempa[j+1]){ temp=a[j]; a[j]=a[j+1]; a[j.. 阅读全文
posted @ 2013-07-01 11:37 冰雪柔情的天空 阅读(164) 评论(0) 推荐(0) 编辑