| Author |
An ArrayList of Arraylist of...
|
Micah Pezdirtz
Greenhorn
Joined: Aug 14, 2006
Posts: 25
|
|
if i had: ArrayList<ArrayList> mainBox; ArrayList<Crayons> crayonBox1; ArrayList<Crayons> crayonBox2; ArrayList<Crayons> crayonBox3; and then proceeded to add each crayonBox to the mainBox, would there be any loss of...whats it called i mean that the mainBox, being an ArrayList of ArrayLists, would be ok to hold ArrayLists<crayons>? i remember before i knew about AraryList<Object> i had to cast and recast things all the time, but would i have to do any of that in this case? i wasnt sure since the main box is ArrayList<ArrayList> and not ArrayList<ArrayList<crayons>> ??? if that kind of thing is existent or necessary. sorry if this is a lame question
|
 |
Keith Lynn
Ranch Hand
Joined: Feb 07, 2005
Posts: 2341
|
|
I would change mainbox to this.
|
 |
Micah Pezdirtz
Greenhorn
Joined: Aug 14, 2006
Posts: 25
|
|
so, that would actually work??? it looks funny, i didnt really expect that to be real thanks!!!
|
 |
 |
|
|
subject: An ArrayList of Arraylist of...
|
|
|