JavaScript has Array.join()
Array.join()
js>[\"Bill\",\"Bob\",\"Steve\"].join(\" and \") Bill and Bob and Steve
Does Java have anything
With java 1.8 stream can be used ,
import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; List list = Arrays.asList("Bill","Bob","Steve"). String str = list.stream().collect(Collectors.joining(" and "));