这种错误的解决方法是什么?网上查不到
HelloWorld.java:27: error: '.class' expected score.sort(scores[]);
HelloWorld.java:27: error: '.class' expected score.sort(scores[]);
2018-11-15
public class HelloWorld {
public void sort(int scores){
int score[]=Arrays.sort(scores);
int count=0;
for(int i=scores.length-1;i>=0;i--){
if(score[i]>=0&&score[i]<=100){
count++;
if(count<3){
System.out.println(score[i]);
} }
}
}
public static void main(String[] args) {
int scores[]={89,-23,64,91,119,52,73};
HelloWorld score=new HelloWorld();
score.sort(scores[]);
}
}
这是代码
举报