Java List to String Array listToStringArray(List list)

Here you can find the source of listToStringArray(List list)

Description

Convert a List of Strings to an Array of Strings

License

Open Source License

Parameter

Parameter Description
list a parameter

Return

the string array

Declaration

public static String[] listToStringArray(List<String> list) 

Method Source Code

//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()]);
    }
}

Related

  1. listToStringArray(List list)
  2. listToStringArray(List objectList)
  3. listToStringArray(List objs)
  4. listToStringArray(List inputList)
  5. listToStringArray(List list)