猿问

可以帮我看看吗?运行不了

import java.util.Arrays;

import java.util.Scanner;

public class test5{

private static final long[] StuFirstThree = null;

public static void main(String[] args){

Scanner input=new Scanner(System.in);

System.out.println("请输入学员个数:");

int numStu=input.nextInt();

int[] StuFirstThree=new int[numStu];

test5 guigod=new test5();

guigod.InputNum(numStu);

}

}

public void InputNum(int length){


for(int i=0;i<=StuFirstThree.length;i++){

System.out.println("请输入第"+i+"个学生的成绩");

Scanner input=new Scanner(System.in);

int numStua=input.nextInt();

StuFirstThree[i]=numStua;

}

}

public void FirstNum(){

Arrays.sort(StuFirstThree);

int k=0;

for(int j=StuFirstThree.length-1;j>0;j--){

if(StuFirstThree[j]>100||StuFirstThree[j]<0){

continue;

if(k>3){

break;

}

}

}

}



qq_unfeeling_03605285
浏览 1329回答 1
1回答
随时随地看视频慕课网APP

相关分类

Java
我要回答