Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Ludwig Fischer   on Jul 18 In Java Category.

  
Question Answered By: Felicia Hill   on Jul 18

Look into one of the implementations of java.util.Set(
AbstractSet, HashSet, LinkedHashSet or TreeSet).
All you have to do is call add() passing in your
Strings
and it will "remove" duplicates for you.

After that if you need to use it as an array just call
the toArray() function of Set which returns an
Object[] .

Share: 

 
 
Didn't find what you were looking for? Find more on String manipulation Or get search suggestion and latest updates.


Tagged: