• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding a value into an existing ArrayList

 
Jolie Lee
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've a collection of data, using iterator and add it in an arraylist.

besides the data, i've retrieved another value and wanted to store in the same arraylist. how can i do that?
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've a collection of data, using iterator and add it in an arraylist.
FYI, have a look at the addAll() method.

besides the data, i've retrieved another value and wanted to store in the same arraylist. how can i do that?
The same way you add any other single object: add().
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic