List<string>
时间: 2024-02-20 11:54:42 浏览: 63
list
以下是将String数组转换为List<String>和将List<String>转换为String数组的示例:
1. 将String数组转换为List<String>:
```java
String[] arr = new String[]{"s1","s2","s3"};
List<String> list = Arrays.asList(arr);
```
2. 将List<String>转换为String数组:
```java
List<String> list = new ArrayList<String>();
list.add("s1");list.add("s2");
list.add("s3");
String[] arr = list.toArray(new String[list.size()]);
```
阅读全文