This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Union of two arrays without using a temporary array?  RSS feed

 
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
Boost this thread!