我在运行此数组时按降序排序值。
Double p[] = new Double[25];
for (int i = 0; i < size; i++) {
gridlet = (Gridlet) list.get(i);
p[t] = gridlet.getActualCPUTime();
t++;
Arrays.sort(p);
Arrays.sort(p, Collections.reverseOrder());
System.out.print(p[i]);
}
它给出了这些错误..
java.lang.NullPointerException
at java.util.ComparableTimSort.countRunAndMakeAscending(Unknown Source)
at java.util.ComparableTimSort.sort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at GridExp.MaxMin.printGridletList(MaxMin.java:460)
at GridExp.MaxMin.main(MaxMin.java:299)
请帮帮我..