求教,就以上课程而言以下有哪些不对?本人小白勿笑
public class HelloWorld {
public static void main(String[] args) {
int[] sorname = {89,-23,64,91,119,52,73,99,100};
HelloWorld dxname = new HelloWorld();
int[] backsorname = dxname.ffname(sorname);
System.out.println("考试成绩的前三名为:");
for(int i=(backsorname.length-1);(i>backsorname.length-4);i--) {
System.out.println(backsorname[i]);
}
}
public int[] ffname(int[] sorname) {
int a=0;
for(int i=0;i<sorname.length;i++) {
if(sorname[i] >=0 && sorname[i] <= 100) {
a=a+1;
}
}
int[] backsorname = new int [a];
int c = 0;
for(int b=0;b<sorname.length;b++) {
if(sorname[b] >=0 && sorname[b] <= 100) {
backsorname[c]=sorname[b];
c=c+1;
}
}
Arrays.sort(backsorname);
return backsorname;
}
}