File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes array of array doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "array of array doubt" Watch "array of array doubt" New topic
Author

array of array doubt

akila sekaran
Ranch Hand

Joined: Jun 12, 2012
Posts: 48


Whats wrong in this ?
How do i add values to list of list of strings??
Joel Christophel
Ranch Hand

Joined: Apr 20, 2011
Posts: 241
    
    1

List<IBean> list = listB.get(j)

How can 'list', which is a List, be equal to the value of a list index?
akila sekaran
Ranch Hand

Joined: Jun 12, 2012
Posts: 48
Joel Christophel wrote:List<IBean> list = listB.get(j)

How can 'list', which is a List, be equal to the value of a list index?


ListB is a List<List<IBean>>
Tony Docherty
Bartender

Joined: Aug 07, 2007
Posts: 2400
    
  50
How do i add values to list of list of strings??

You get a reference to the list of strings from the list of list of strings (eg by calling it's get() method) and then call it's add() method passing in the String you want to add.
Do you have a list of list of strings in the code shown?

BTW line 6 is overly complicated by you trying to do way too much on one line. I suggest you break into at least 3 lines, it will make your code easier to read and less prone to bugs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: array of array doubt