📜  java 将数组转换为列表 - Java 代码示例

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

代码示例6
String[] myArray = new String[] { "I", "like", "eating", "pizza" };
List myList = Arrays.asList(myArray);

myList.forEach(string -> System.out.println(string));

// -output-
// I
// like
// eating
// pizza
// -output-