Java List to String Array listToStringArray(List list)

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

Description

list To String Array

License

LGPL

Declaration

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

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.List;

public class Main {

    public static String[] listToStringArray(List<String> list) {
        if (null == list) {
            String[] stringArray = {};
            return stringArray;
        }//from  w w w  .  j  a v  a2  s .co m
        String[] stringArray = new String[list.size()];
        list.toArray(stringArray);
        return stringArray;
    }
}

Related

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