- Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathClient.java
More file actions
Latest commit
23 lines (19 loc) · 675 Bytes
/
Copy pathClient.java
File metadata and controls
23 lines (19 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
packageu009;
/**
* Created by HuGuodong on 11/21/19.
*/
publicclassClient {
publicstaticvoidmain(String[] args) throwsException{
IResumer1 = newResume_deep();
r1.setPersonalInfo("Allen", 23);
r1.setWorkExperience("2010-2020", "AWS");
// IResume r2 = (Resume_deep) ((Resume_deep) r1).clone();
// deepCopy
IResumer2 = (Resume_deep) ((Resume_deep) r1).deepCopy();
r2.setWorkExperience("2009-2015", "ShenzhenPingShan hospital");
r1.print();
r2.print();
// Resume{name='Allen', age=23, timeSpan='2010-2020', company='AWS'}
// Resume{name='Allen', age=23, timeSpan='2009-2015', company='ShenzhenPingShan hospital'}
}
}