为什么用带参带返回值的方法不行?
import java.util.Arrays;
public class HelloScore {
public static void main(String[] args) {
int[] scores = { 89, -23, 64, 91, 119, 52, 73};
HelloScore score = new HelloScore();
int sortthenum = score.sortScore();
System.out.println(sortthenum);
}
public int sortScore(int[] scores){
Arrays.sort(scores);
int j = 0;
for ( int i = scores.length - 1; i >= 0; i --){
if (scores[i] < 0 || scores[i] > 100) {
continue;
}else{
j++;
if (j > 3){
break;
}
return int[] scores;//这一句总是报错说: '.class' expected 是什么意思?
}
}
}
}