set to list java code example
Example 1: java list to set
Set foo = new HashSet(myList);
Example 2: set to list java
public void givenUsingCoreJava_whenSetConvertedToList_thenCorrect() {
Set sourceSet = Sets.newHashSet(0, 1, 2, 3, 4, 5);
List targetList = new ArrayList<>(sourceSet);
}