81,076
社区成员




package red.star;
public class ScoreList
{ String studentName,courseName="",score="";
StringBuffer scoreWatch=new StringBuffer();
public void setScore(String n)
{ score=n;
}
public void setStudentName(String s)
{ studentName=s;
}
public void setCourseName(String s)
{ courseName=s;
}
public String getCourseName()
{ return courseName;
}
public StringBuffer getScoreWatch()
{ if(studentName!=null&&studentName.length()>0&&score.length()>0)
{ scoreWatch.append("<tr>");
scoreWatch.append("<td width=150 Align=Center>");
scoreWatch.append(studentName);
scoreWatch.append("</td>");
scoreWatch.append("<td width=60 Align=Center>");
scoreWatch.append(""+score);
scoreWatch.append("</td>");
scoreWatch.append("</tr>");
studentName=""; \\这句
score=""; \\上一句和这一句是什么意思,作用是什么?
}
return scoreWatch;
}
}