In this article, we will see how to use StringJoiner class in Java.
Lets look to our code.
StringJoiner sj1 = new StringJoiner(",");
sj1.add("andromeda");
sj2.add("is a galaxy");
Lets see it in an example.
In above example, we created a StringJoiner object and using "," delimeter, we merged two string .