JavaScript has Array.join()
js>[\"Bill\",\"Bob\",\"Steve\"].join(\" and \")
Bill and Bob and Steve
Does Java have anything
java.util.StringJoiner
Java 8 has got a StringJoiner class. But you still need to write a bit of boilerplate, because it's Java.
StringJoiner sj = new StringJoiner(" and ", "" , "");
String[] names = {"Bill", "Bob", "Steve"};
for (String name : names) {
sj.add(name);
}
System.out.println(sj);