File tree Expand file tree Collapse file tree 3 files changed +3
-1
lines changed
CCVT_Code_Distribute/src/com/rt/cloning Expand file tree Collapse file tree 3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public int getDid() {
10
10
public void setDid (int did ) {
11
11
this .did = did ;
12
12
}
13
+
13
14
public String getDname () {
14
15
return dname ;
15
16
}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public String toString() {
46
46
// TODO Auto-generated method stub
47
47
return "Employee id: " +eid +" Employee Name: " +ename +" Dep Name:" +dep .getDname ()+" Dep Id:" +dep .getDid ();
48
48
}
49
-
49
+ //temp.dep=this.dep.clone();
50
50
@ Override
51
51
protected Employee clone () throws CloneNotSupportedException {
52
52
// TODO Auto-generated method stub
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ public static void main(String[] args) throws CloneNotSupportedException {
20
20
e2 .getDep ().setDid (8 );
21
21
e2 .getDep ().setDname ("Acc" );
22
22
System .out .println (e1 );
23
+
23
24
System .out .println (e2 );
24
25
//new Employee().getEid();
25
26
System .out .println (e1 instanceof Cloneable );
You can’t perform that action at this time.
0 commit comments