public static List<Student> getAllStu01()
{
return allStu;
}
public static void randTotal()
{
Student temp;
for(int i=1;i<getAllStu01().size();i++)
{
for(int j=0;j<getAllStu01().size()-i;j++)
{
if(getAllStu01().get(j).getTotal()<getAllStu01().get(j+1).getTotal())
{
temp=allStu.get(j);
// getAllClass().get(j)=allStu.get(j+1);
// getAllClass().get(j+1)=temp }
}
}
for(int m=0;m<getAllClass().size();m++)
{
getAllClass().get(m).printAll();
}
}
是要实现按总分排序然后将学生按中分从多到是输出 但是上面注释的两行出现The left-hand side of an assignment must be a variable这样的错误 麻烦帮忙看看……
{
return allStu;
}
public static void randTotal()
{
Student temp;
for(int i=1;i<getAllStu01().size();i++)
{
for(int j=0;j<getAllStu01().size()-i;j++)
{
if(getAllStu01().get(j).getTotal()<getAllStu01().get(j+1).getTotal())
{
temp=allStu.get(j);
// getAllClass().get(j)=allStu.get(j+1);
// getAllClass().get(j+1)=temp }
}
}
for(int m=0;m<getAllClass().size();m++)
{
getAllClass().get(m).printAll();
}
}
是要实现按总分排序然后将学生按中分从多到是输出 但是上面注释的两行出现The left-hand side of an assignment must be a variable这样的错误 麻烦帮忙看看……
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货