amit cha wrote:The class Node , Linked and Test are used for linked list...
Vehicle class object reference is passed to the list.
now all i want is to clone the object..which i have tried...but it is not working ..giving error.
I want shallow clone on the object...
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
amit cha wrote:is is giving me error...
i know there is something wrong with the above code..i just want to know"What is wrong in the code"
What on earth does that mean?amit cha wrote:Sorry Vehicle class initializes the value of the object ... passed from the test class
amit cha wrote:@Winston Gutkowski -- vehicle class is just for creating objects ... and those objects are passes to the list..
yes i want shallow clone.. but the problem is when i am trying to clone it
public Object clone()
try
{
Linked nObj= (Linked) super.clone();
nObj.data =()head.clone();
return nobj;
} catch (CloneNotSupportedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
is is giving me error...
i know there is something wrong with the above code..i just want to know"What is wrong in the code"
science belief, great bioscience!
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
|