Java 结构体排序两种方法(Comparable, Comparator)
摘要:
http://blog.csdn.net/liang5630/article/details/8221041importjava.io.*;importjava.util.*;importjava.math.*;publicclassMain{Nodea[];voidrun(){a=newNode[10];for(inti=0;i<10;i++){a[i]=newNode();a[i].x=9-i;a[i].y=i;}Arrays.sort(a);// Arrays.sort(a,newcmp());// Arrays.sort(a,0,n,newcmp());for(inti=0;i& 阅读全文
posted @ 2013-02-22 10:08 Sure_Yi 阅读(871) 评论(0) 推荐(0) 编辑