< prev index next >
src/demo/share/java2d/J2DBench/src/j2dbench/report/IIOComparator.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
@@ -282,21 +282,21 @@
Vector keylist = new Vector();
while (e.hasMoreElements()) {
String key = (String)e.nextElement();
keylist.add(key);
}
- String keys[] = new String[keylist.size()];
+ String[] keys = new String[keylist.size()];
keylist.copyInto(keys);
if (special) {
sort2(keys);
} else {
sort(keys);
}
return keys;
}
- public static void sort(String strs[]) {
+ public static void sort(String[] strs) {
for (int i = 1; i < strs.length; i++) {
for (int j = i; j > 0; j--) {
if (strs[j].compareTo(strs[j-1]) >= 0) {
break;
}
@@ -305,11 +305,11 @@
strs[j] = tmp;
}
}
}
- public static void sort2(String strs[]) {
+ public static void sort2(String[] strs) {
for (int i = 1; i < strs.length; i++) {
for (int j = i; j > 0; j--) {
if (compare(strs[j-1], strs[j])) {
break;
}
< prev index next >