0 votes
1 view
in Java by (3.9k 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 (46.1k points)

Try:

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

Related questions

0 votes
1 answer
asked 3 days ago in Java by Anvi (10.2k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...