Here you can find the source of listToStringArray(List
Parameter | Description |
---|---|
list | a parameter |
public static String[] listToStringArray(List<String> list)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**/*from w w w . j a v a2 s.c o m*/ * Convert a List of Strings to an Array of Strings * @param list * @return the string array */ public static String[] listToStringArray(List<String> list) { return list.toArray(new String[list.size()]); } }