Posted By:
khelil_gribaa
Posted On:
Friday, February 18, 2005 02:13 AM
Hi, I'm looking for the reason why when I clone a vector using its property vector.clone(), it's not really cloned ! I mean : I have a vector vect1 that contains beans which implements cloneable ! when I clone the vector ( vect1 = (Vector)vect2.clone() ) and then change some values : for exemple : bean1 = (Bean1)vect1.get(0) ; bean1.setX( "val1" ) ; I will find this value in the bean of the vect2 ! My question is what do I have to do to get totally independent and different vectors ! Of course I'm looking for something else using the "for loop" thanks for help guys.
More>>
Hi,
I'm looking for the reason why when I clone a vector using its property vector.clone(), it's not really cloned !
I mean :
I have a vector vect1 that contains beans which implements cloneable !
when I clone the vector ( vect1 = (Vector)vect2.clone() ) and then change some values :
for exemple :
bean1 = (Bean1)vect1.get(0) ;
bean1.setX( "val1" ) ;
I will find this value in the bean of the vect2 !
My question is what do I have to do to get totally independent and different vectors !
Of course I'm looking for something else using the "for loop"
thanks for help guys.
<<Less