• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

find duplicates

 
rrmanthena raju
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have two arrays which contains strings
i want to create new array which contains elments that are in array[1] not in second array[2]
plese tell me better solution
(its similar to a-b)
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could create two Collections, then call removeAll(Collection c) on one, passing the other.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"plese tell me better solution" - a better solution than what? What have you tried?

I'm moving this to the intermediate forum where its a better fit. Please post your replies there.

Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic