I have many functions that take a global ArrayList as an argument, some of them don't make any change of this list, and others are need to remove some elements of this array while working, so i create a local tempArrays inside these function.
static ArrayList array1 = new ArrayList();
public fn1(ArrayList array1)
{
   ArrayList tempArray1 = new ArrayList();
   tempArray1 = array1;
   tempArray1.remove(elemnt);
}
The problem is the deleted elements is deleted also from original arrayList array1, i don't know why? .
Thanks..
 
     
     
     
     
     
     
     
     
    