I got a Business Object and one member is a arraylist. I have a setmethod on that member that takes in an arraylist. I wanted to set that arraylist to the member arraylist. How do I get it to work? ArrayList a; ArrayList b; I can say a = b.
Of course note that this doesn't copy the ArrayList object nor does it make a copy of the components of the ArrayList. It just assigns the ArrayList object to the member identifier. If you wanted to make a copy of the ArrayList, the code you'd use would depend upon what you meant by 'copy'. If a shallow copy were desired, then making use of the clone method or the ArrayList constructor that takes a Collection as an argument would suffice. If a new ArrayList object populated with copies of the components from the original ArrayList were desired, then the code to accomplish this task could become considerably more involved. Are you getting any ideas, Anthony?