taking union of two array elements

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • agsupriya86
    New Member
    • Mar 2007
    • 34

    taking union of two array elements

    Hi,

    I have a LinkedList of arrays ,Each array containing certain keywords..i need to take the union of all keywords presents in all the arrays of the linked list...that is removing the duplicates words and then combining all..

    Can u please prvide me with some help regarding this??
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by agsupriya86
    Hi,

    I have a LinkedList of arrays ,Each array containing certain keywords..i need to take the union of all keywords presents in all the arrays of the linked list...that is removing the duplicates words and then combining all..

    Can u please prvide me with some help regarding this??
    Collections have an addAll method that takes another collection as well.
    The remove duplicates thing is even easier. Just look up HashSet.

    Comment

    Working...