forked from Drun1baby/JavaSecurityLearning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPerson.java
More file actions
57 lines (45 loc) · 1.32 KB
/
Copy pathPerson.java
File metadata and controls
57 lines (45 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package SerializeTest;
public class Person {
private String name;
private Integer age;
public String school;
protected String province;
public String getSchool() {
System.out.println("getSchool 方法被调用");
return school;
}
public void setSchool(String school) {
System.out.println("setSchool 方法被调用");
this.school = school;
}
public String getProvince() {
System.out.println("getProvince 方法被调用");
return province;
}
public void setProvince(String province) {
System.out.println("setProvince 方法被调用");
this.province = province;
}
public Person() {
System.out.println("构造函数被调用");
}
public void printInfo(){
System.out.println("name is " + this.name + "age is" + this.age);
}
public String getName() {
System.out.println("getName 方法被调用");
return name;
}
public void setName(String name) {
System.out.println("setName 方法被调用");
this.name = name;
}
public Integer getAge() {
System.out.println("getAge 方法被调用");
return age;
}
public void setAge(Integer age) {
System.out.println("setAge 方法被调用");
this.age = age;
}
}