Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Union of two arrays without using a temporary array?

 
sunilkumar suparasmul
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Union of two ArrayLists without using a temporary array?
do anybody have source code for this please let me know.
or any suggetsiions how it can be done?
i have two Arraylist objetcs and i need to do a union of it
in the first arraylist itself which would contain elements fron the first and second arraylist together withour repetition

------------------
 
sandeep jakkaraju
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

public boolean addAll(Collection c)

Appends all of the elements in the specified Collection to the end of this list, in the order that they are returned by the specified Collection's Iterator. The behavior of this operation is undefined if the specified Collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is this list, and this list is nonempty.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic