package Test;
import java.util.Date;
public class test {
public static void main(String[] args) {
Student stu=new Student();
stu.setName("zhangsan");
stu.setAge(18);
stu.setBirthday(new Date().toString());
System.out.println(stu);
}
}
class Student{
private String name;
private int age;
private String birthday;
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 String getBirthday() {
return birthday;
}
public void setBirthday(String birthday) {
this.birthday = birthday;
}
public String toString(){
return "name="+name+"\tage="+age+"\tbirthday"+birthday;
}
}