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.

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.