View Single Post
  #2 (permalink)  
Old 12-29-2007, 12:04 PM
tim's Avatar
tim tim is offline
Senior Member
 
Join Date: Dec 2007
Location: South Africa
Posts: 334
tim is on a distinguished road
Clone method not implemented?
Hello

It does not appear that you implemented the clone() method in the Node<V> class. When you implement the clone() method, you should create a new object and assign each original primitive type to the duplicates fields and call the clone methods of the non-primitive types. It could be that your class has inherited the clone() method from that Object class that all classes inherit from by default. That could be why your program compiles and behaves strangely.
__________________
If your ship has not come in yet then build a lighthouse.
Reply With Quote