sending and arraylist in one class as an element to an arraylist of another class.
Posted on 2004-09-01
I have an arraylist declared in my class X
===> ArrayList arr = new Arraylist();
Im my actionPerformed method I've add'd an element to my arrayList everytime a button was clicked.
===> arr.add("Element 1"); ..etc..
now I have another class Y which contains another ArrayList -
im trying to send the arraylist in my class X as an element to the arraylist that i have created in my class Y.
- How can i go about doing that, i know its easy but i can't seem to get it.