Skip to content

Java 数组和 List 互转

🏷️ Java

数组转 List

java
List<String> seats = java.util.Arrays.asList(strSeats.split(","))

List 转数组

java
seats.toArray(new String[seats.size()])

参考