Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How To Eliminate Duplicates in Arrays

807600Nov 5 2007 — edited Nov 5 2007
Hi,

I have a problem about duplicates eliminations in arrays.

For example, I have two integer arrays:
array1: 0, -4, -6, -7, -6, 2
array2: -6, 7, 3, -5, 2, 0, 4, 3, 0

And I want to eliminate duplicates of each array, so the resultant arrays should be:
array1: 0, -4, -6, -7, 2
array2: -6, 7, 3, -5, 2, 0, 4

Sorted or not, doesn't really matter.

Please help :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2007
Added on Nov 5 2007
11 comments
351 views