怎么不全?
public class Student {
public String name;
public int age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
}
--------------------------------------------------------------------------------------------------------------
public class StudentImpl {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Student student = new Student();
student.setName("zhangsan");
student.setAge(19);
System.out.println(student.getName() + "今年" + student.getAge() +"岁。");
}
}