Here you can find the source of setToArray(Set
public static final String[] setToArray(Set<String> set)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static final String[] setToArray(Set<String> set) { String[] array = set.toArray(new String[set.size()]); return array; }//from www . java2s . c om }