try { DeepSheep copy = (DeepSheep)super.clone(); copy.flock = (Hashtable)flock.clone(); return copy; } catch (CloneNotSupportedException e ) { throw new Error("This should never happen!"); }
DeepSheep one = new DeepSheep(); DeepSheep anotherOne = (DeepSheep)one.clone();