S
stevetanner55
I have successfully created a small application that uses arraylists
of objects. However I have found it quite tiresome , when modifying
one of the objects in the arraylist to have to assign it to a
temporary instance before re-writing it.
something like...
temp_object1 = (object1) object1_arraylist[10]
temp_object1.element = "Something else"
object1_arraylist[10] = temp_object1
because it seems impossible to simply code:
(object1_arraylist[10]).element = "Something else"
Is there a simple way round this? Would pointers help?
Thanks for the tip!
steve tanner
of objects. However I have found it quite tiresome , when modifying
one of the objects in the arraylist to have to assign it to a
temporary instance before re-writing it.
something like...
temp_object1 = (object1) object1_arraylist[10]
temp_object1.element = "Something else"
object1_arraylist[10] = temp_object1
because it seems impossible to simply code:
(object1_arraylist[10]).element = "Something else"
Is there a simple way round this? Would pointers help?
Thanks for the tip!
steve tanner