Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

convert set to list java

public void givenUsingCoreJava_whenSetConvertedToList_thenCorrect() {
   Set<Integer> sourceSet = Sets.newHashSet(0, 1, 2, 3, 4, 5);
   List<Integer> targetList = new ArrayList<>(sourceSet);
}
Source by www.baeldung.com #
 
PREVIOUS NEXT
Tagged: #convert #set #list #java
ADD COMMENT
Topic
Name
3+7 =