View Single Post
  #3 (permalink)  
Old 01-20-2008, 09:57 AM
CaptainMorgan's Avatar
CaptainMorgan CaptainMorgan is offline
Moderator
 
Join Date: Dec 2007
Location: NewEngland, US
Posts: 841
CaptainMorgan will become famous soon enoughCaptainMorgan will become famous soon enough
Send a message via AIM to CaptainMorgan
This can probably lead to confusing code down the road, and I would hope someone might have something better but you can try this:
Code:
ArrayList< ArrayList<String> > my_2dlist = new ArrayList< ArrayList<String> >(); my_2dlist.add( new ArrayList<String>() ); my_2dlist.get(0).add("Hello, World"); System.out.println(my_2dlist.get(0).get(0));
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
to our beloved Java Forums!
(closes on September 4, 2008)
Want to voice your opinion on your IDE/Editor of choice?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
!
Got a little Capt'n in you? (drink responsibly)
Reply With Quote