• Post Reply Bookmark Topic Watch Topic
  • New Topic

List append  RSS feed

 
Jacob Sonia
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
suppose i want to add things to list on each iteration like this
while(i > 0)
AddressList = find(addresses);
i--;
}

please tell me how is it possible that my AddressList is kind of adding the records in the list rather than creating a new list and at last having only the latest records
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without the source code of the find method we cannot say anything about this.
 
Jacob Sonia
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, it is like this



so suppose find(b) returns 10 records each time, i want a to have ultimately 40 records...did you get the point
 
Rob Spoor
Sheriff
Posts: 21133
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not the source code, it doesn't even come close to compiling. http://faq.javaranch.com/java/TellTheDetails
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!