Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java set from string array

Set<Integer> targetSet = new HashSet<Integer>(Arrays.asList(sourceArray));

// with google guava
Set<Integer> targetSet = Sets.newHashSet(sourceArray);
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #java #set #string #array
ADD COMMENT
Topic
Name
2+5 =