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

简单的代码

public static void main(String[] args){

 ifss hello =new ifss();

 int[] scores ={91,89,23,64,119,52,73};

 Arrays.sort(scores);

  System.out.println("考试成绩的前三名:");

  int a=0;

  int b=0;

  int c=0;

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

 

 

 if(scores[i]>100){

 continue;

 }else if (a<scores[i]){        

a=scores[i];

 }

 }

 for(int q=0;q<scores.length;q++){

 if(scores[q]>=a){

continue;

 }else  if(b<scores[q]){

b=scores[q];

 }

 }

 

 for(int z=0;z<scores.length;z++){

 if(scores[z]>=b){

 continue;

 }else if(c<scores[z]){

c=scores[z];

 } 

 

  }

  

  System.out.println(a);

  System.out.println(b);

  System.out.println(c);

  

  

  

  

  

  

  

  

  

  

  }


  

  

  }


正在回答

3 回答

ifss hello =new ifss();  换成 HelloWorld hello =new HelloWorld();

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

你创建的是什么类?方法应该在HelloWorld类中运行,编译器找不到你的“ifss ”类,所以就没用

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

补充一下:ifss hello =new ifss();这个没用

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

举报

0/150
提交
取消
Java入门第一季(IDEA工具)升级版
  • 参与学习       1162606    人
  • 解答问题       17547    个

0基础萌新入门第一课,从Java环境搭建、工具使用、基础语法开始

进入课程

简单的代码

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