public class join { public static void main(String[] args) { String str = String.join(" - ", "foo", "bar", "baz"); System.out.println(str); } }
Index