import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the strings to join");
String s1 = sc.nextLine();
String s2 = sc.nextLine();
String s3 = sc.nextLine();
System.out.println("Enter delimiter[like -/./ ]: ");
String delimiter = sc.nextLine();
System.out.println("delimiter is >" + delimiter + "<");
String result = String.join(delimiter, s1, s2, s3);
System.out.println(result);
}
}
Comments
0 B
|👍
/👎
0 B
|👍
/👎
0 B
|👍
/👎