hi,
my arraylistS in a covering arraylist behave like the same instance.
i manupulate one of them with
i=0; manupulate(myarrofarrs.get(i));
, and all the sub arraylists have become effected of the manupulation.
i googled a little but in google it was said: "create new instance with myvar=new myobject()"
i have already done so.
here is the code:
ArrayList<MyObj> geciciListe=new ArrayList<MyObj>();
while(some condition){
tempList=new ArrayList<MyObj>();//here is the advise
i=0;
while(i<max){
if(some condition){
tempList.add(myObjarray[i]);
}else{
templist.add(myotherobjarray[i]);
}
i++;
}
theCoveringRootArraylist.add(templist);
}
after this loop i manupulate by the way:
while(){
ArrayList<MyObj> a=new ArrayList<MyObj>();
a=(ArrayList)theCoveringRootArraylist.get(i);
manupulate(a);//
theCoveringRootArrayList.set(i,a);
}
as you can see i do everything to make feel them they are different instances but, every one is effected with manupulate method.
what can be the problem
thanks in advance