class Student {
private String name;
private int age;
public String getName(){
return name;
}
public String setName(String m){
name = m;
}
public int getAge (){
return age;
}
public int setAge (int a){
age = a;
}
}
class StudentTest {
public static void main(String[] args){
Student s = new Student();
s.setName("林青霞");
s.setAge(23);
System.out.println(s.getName()+"-------"+s.getAge());
}
}
C:\Users\a\Desktop