Java List to Array toArray(List list)

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

Description

to Array

License

Open Source License

Declaration

public static String[] toArray(List list) 

Method Source Code


//package com.java2s;

import java.util.List;
import java.util.Set;

public class Main {

    public static String[] toArray(List list) {
        return (String[]) list.toArray(new String[list.size()]);
    }//from w  w  w  .  java 2 s  .  c  om

    public static String[] toArray(Set set) {
        return (String[]) set.toArray(new String[set.size()]);
    }
}

Related

  1. toArray(Collection list)
  2. toArray(Collection list)
  3. toArray(final List list)
  4. toArray(final List list)
  5. toArray(final List list)
  6. toArray(List list)
  7. toArray(List list)
  8. toArray(List list)
  9. toArray(List list, Object array[], int start, int end)