Java Collection to String asStringArray(Collection collection)

Here you can find the source of asStringArray(Collection collection)

Description

as String Array

License

Open Source License

Declaration

public static String[] asStringArray(Collection<String> collection) 

Method Source Code

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

import java.util.Collection;

public class Main {
    public static String[] asStringArray(Collection<String> collection) {
        String[] result = new String[collection.size()];
        collection.toArray(result);//from   w  ww.j  ava 2  s . co m
        return result;
    }
}

Related

  1. asString(Collection c, String separator)
  2. asString(Collection collection)
  3. asStringArr(Collection collection)
  4. asStringArray(Collection coll)
  5. buildString(Collection args, String seperator, int startingArg, int maxLength)
  6. buildString(Collection keys)
  7. buildStringFromListForNuma(Collection list)
  8. collectionToCommaDelimitedString(Collection items)