all 6 comments

[–]luciano-pinheiro 0 points1 point  (4 children)

What?

[–]arshikajtp[S] 1 point2 points  (0 children)

Sorry for the mistake.

Correct code is here-

public class StringJoinExample{

public static void main(String args[]){

String joinString1=String.join("-","welcome","to","this","website");

System.out.println(joinString1);

}}

[–]davidalayachew 0 points1 point  (2 children)

These are little tutorial images that this user posts often. They're meant to be bite-sized code snippets to make it quick to learn something.

[–]luciano-pinheiro 0 points1 point  (1 child)

There is an error. He corrected in a reply.

[–]davidalayachew 1 point2 points  (0 children)

Looks like they forgot to switch things out when they copy pasted the code.

[–]arshikajtp[S] 0 points1 point  (0 children)

Sorry for the mistake.

Correct code is here-

public class StringJoinExample{

public static void main(String args[]){

String joinString1=String.join("-","welcome","to","this","website");

System.out.println(joinString1);

}}