Java List to String listToStrArray(List list)

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

Description

list To Str Array

License

Open Source License

Declaration

public static String[] listToStrArray(List list) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Iterator;
import java.util.List;

public class Main {
    public static String[] listToStrArray(List list) {
        if (list != null) {
            String curStr[] = new String[list.size()];
            int n = 0;
            for (Iterator j = list.iterator(); j.hasNext(); n++) {
                curStr[n] = (String) j.next();
            }// www  .j  a v  a  2s .  com
            return curStr;
        }
        return null;
    }
}

Related

  1. listToStr(Collection a, char sep)
  2. listToStr(Collection c, String delim)
  3. listToStr(List lst)
  4. listToStr(List list)
  5. listToStr(List stringList)
  6. listToString (final List l)
  7. listToString(Collection col)
  8. listToString(Collection l)
  9. listToString(final List list, final String separator)