Here’s the code to join a few strings and glue them with a delimiter.
StringJoiner stringJoiner = new StringJoiner(",");
stringJoiner.add("Fredy");
stringJoiner.add("Steve");
stringJoiner.add("Bobby");
stringJoiner.add("Guru");
System.out.println(stringJoiner); //Prints: Fredy,Steve,Bobby,Guru