为了账号安全,请及时绑定邮箱和手机立即绑定

第50行报错".class expected"

import java.util.Arrays;public class HelloWorld {        //完成 main 方法    public static void main(String[] args) {        int score[]={89 , -23 , 64 , 91 , 119 , 52 , 73};                HelloWorld hello = new HelloWorld();                int outSelection[] = hello.selection(score);            }        //定义方法完成成绩排序并输出前三名的功能        public int[] selection (int scores[]){                int b = 0;                Arrays.sort(scores);                int output[];                for(int a = scores.length ; a > 0 ; a++){                        if((scores[a] >= 0 )&(scores[a]<= 100)&(b < 3)){                                output[b] = scores[a];                                b = b + 1;                                                                                                                                            }                                                        }                                return output[];                    }                                }


正在回答

1 回答

代码全部贴出来

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

第50行报错".class expected"

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信