自己写的这个代码,有些问题,求助啊。。
public class Test7
{
public static void main(String[] args)
{
Student stu = new Student("张三",22,95);
}
}
public class Student //这里的这个student有个红色下划线为什么啊?
{
private String name;
private int age;
private int score;
public Student(String name, int age, int score)
{
this.name = name;
this.age = age;
this.score = score;
}
public void set (String name,int age,int score)
{
this.name = name;
this.age=age;
this.score=score;
}
public Object get ()
{
return this.name;
return this.age;
return this.score ;
}
}
|
|