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() {
1010 public void setDid (int did ) {
1111 this .did = did ;
1212 }
13+
1314 public String getDname () {
1415 return dname ;
1516 }
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public String toString() {
4646 // TODO Auto-generated method stub
4747 return "Employee id: " +eid +" Employee Name: " +ename +" Dep Name:" +dep .getDname ()+" Dep Id:" +dep .getDid ();
4848 }
49-
49+ //temp.dep=this.dep.clone();
5050 @ Override
5151 protected Employee clone () throws CloneNotSupportedException {
5252 // 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 {
2020 e2 .getDep ().setDid (8 );
2121 e2 .getDep ().setDname ("Acc" );
2222 System .out .println (e1 );
23+
2324 System .out .println (e2 );
2425//new Employee().getEid();
2526 System .out .println (e1 instanceof Cloneable );
You can’t perform that action at this time.
0 commit comments