Does anyone know how to send an arraylist from one object to another?.....and how can i put 6 arraylists into one array list? THANK YOU
Does anyone know how to send an arraylist from one object to another?.....and how can i put 6 arraylists into one array list? THANK YOU
Pass the reference to the arrayList to the other object.
Use the add method.
Yezz, you don't "send" the arraylist anywhere, the containing object just "tells" the other object where the arraylist is, or more precisely where it starts.
Or are you thinking about sending it in a stream to a client or a server? If so, look at Serializable ... puts the object into a stream where it can be reconstructed "at the other end" ...