quiz

Full-stack dev quiz question #57

Full-stack dev quiz question #57quiz

Are you as good as a Java compiler? Look at this code and say what it does. Check fifty seventh question of full-stack dev quiz to check if you know the joining collector.

Look at the Java 11 code below and say what it prints to the standard output.

System.out.println(List.of("a", "b", "c").stream().collect(Collectors.joining(",")));

Choose the best answer.

  1. abc,
  2. ,abc,
  3. a,b,c
  4. a,b,c,
  5. ,a,b,c,

For the correct answer scroll down

.

.

 

 

 

 

 

 

 

 

 

 

Do not miss valuable content. You will receive a monthly summary email. You can unsubscribe anytime.

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The correct answer is: c. If you would like to read more, check Join string array in Java - performance article.

If you like what I do, consider buying me a coffee :)

Buy me a coffeeBuy me a coffee