• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

removing duplicates in array ...?????

 
oool las
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
urgent please,
how to remove duplicates in an array
thanx.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a Set out of the array.
 
oool las
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Preuss,
can i have source code of it please
because iam week in refering api
thanx.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
from memory, therefore without warranty:

Notice, though, that the sequence of the elements will not be maintained by this solution.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by oool las:
hello Preuss,
can i have source code of it please
because iam week in refering api
thanx.

If you are weak in using the API then you absolutely need to work on that. It is impossible to be a Java programmer without being able to read the API. I wouldn't write another line of code until I have figured out how the API works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic