虽然没看出你要打印什么,不过语法有2个错误,应该是
if (i % 2 == 1) {
forsort[i] = (Integer.parseInt((a[i])));
}
和
for (int s = 0; s < forsort.length; s++) {
for (int ss = s; ss < forsort.length; ss++) {
if (forsort[s] < forsort[ss]) {
int ITemp = forsort[ss];
forsort[ss] = forsort[s];
forsort[s] = ITemp;
String Ip = a[ss];
a[ss] = a[s];
a[s] = Ip;
}
}
}
if (i % 2 == 1) {
forsort[i] = (Integer.parseInt((a[i])));
}
和
for (int s = 0; s < forsort.length; s++) {
for (int ss = s; ss < forsort.length; ss++) {
if (forsort[s] < forsort[ss]) {
int ITemp = forsort[ss];
forsort[ss] = forsort[s];
forsort[s] = ITemp;
String Ip = a[ss];
a[ss] = a[s];
a[s] = Ip;
}
}
}