join() method
This method will allow you to provide the string joined with the provided delimiter. The delimiter will get copied for each of the string elements. If you are using the null element, then the null is added.
Syntax-
and
Note: This method will throw NullPointerException if the specified element is null.