String.join(" - ", "This", "course", "is", "awesome");
// ou
String.join(" - ", new String[]{"This","course","is","awesome"});
// retourne "This - course - is - awesome"
String.valueOf(22); // retourne "22"
String a = "Hello";
String b = " World";
String c = a+b;
class Main {
public static void main(String[] args) {
// create first string
String first = "Java ";
System.out.println("First String: " + first);
// create second
String second = "Programming";
System.out.println("Second String: " + second);
// join two strings
String joinedString = first.concat(second);
System.out.println("Joined String: " + joinedString);
}
}
// Java program to demonstrate
// working of join() method
class Gfg1 {
public static void main(String args[])
{
// delimiter is "<" and elements are "Four", "Five", "Six", "Seven"
String gfg1 = String.join(" < ", "Four", "Five", "Six", "Seven");
System.out.println(gfg1);
}
}