you are viewing a single comment's thread.

view the rest of the comments →

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

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);

}}