标题: 怎么就编译出错了,求大神指教 [打印本页] 作者: 250034275 时间: 2016-3-16 21:34 标题: 怎么就编译出错了,求大神指教 class F {
public static void main(String[] args) {
Student a = new Student();
a.setChinese(99);
System.out.println(a.getChinesee());
setMath(108);
System.out.println(a.getMath());
setEnglish(106);
System.out.println(a.getEnglish());
System.out.println(a.getSum());
}
}
class Student {
private int chinese;
private int math;
private int english;
public void setChinese(int chinese) {
this.chinese = chinese;
}
public int getChinese() {
return chinese;
}
public void setMath(int math) {
this.chinese = chinese;
}
public int getMath() {
return math;
}
public void setEnglish(int english) {
this.english = english;
}
public int getEnglish() {
return english;
}
public int getSum(int chinese,int math,int english ) {
return chinese+math+english;
}