0 votes
1 view
in Java by (3k points)

I am currently doing this:

Set<String> setOfTopicAuthors = ....

List<String> list = Arrays.asList( 

    setOfTopicAuthors.toArray( new String[0] ) );

Can you beat this ?

1 Answer

0 votes
by (32.7k points)

Try:

List<String> list = new ArrayList<String>(listOfTopicAuthors);

...