📜  将集合转换为列表 java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.309000             🧑  作者: Mango

代码示例1
public void givenUsingCoreJava_whenSetConvertedToList_thenCorrect() {
   Set sourceSet = Sets.newHashSet(0, 1, 2, 3, 4, 5);
   List targetList = new ArrayList<>(sourceSet);
}