首页 新闻 会员 周边

小白学Java

0
悬赏园豆:5 [已关闭问题] 关闭于 2021-03-05 20:19

package exer1;

import javax.xml.transform.Templates;

import org.omg.CORBA.PUBLIC_MEMBER;

public class StudentTest {
public static void main(String[] args) {

}

public void sort(Student[] stus){
for(int i=0;i<stus.length-1;i++){
for(int j=0;j<stus.length-1-i;j++)
// if(stus[j].score>stus[j+1].score){
Student tem = stus[j];//这个位置报错是为啥呢
// }
}
}

}
class Student{
int number;
int state;
int score;
public String info(){
return "学号:"+number + ",年级:"
+ state +",成绩"+score;
}
}

李家成的主页 李家成 | 菜鸟二级 | 园豆:202
提问于:2021-03-05 20:17
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册