File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes find duplicates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "find duplicates" Watch "find duplicates" New topic

find duplicates

rrmanthena raju

Joined: Nov 01, 2004
Posts: 7
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

Joined: Apr 14, 2004
Posts: 10336

You could create two Collections, then call removeAll(Collection c) on one, passing the other.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Jessica Sant

Joined: Oct 17, 2001
Posts: 4313

"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.

I agree. Here's the link:
subject: find duplicates