It is used to construct a sequence of characters separated by a delimiter. Now, you can create string by passing delimiters like comma(,), hyphen(-) etc.
You can also pass prefix and suffix to the char sequence.- jdk1.8

Constructor – public StringJoiner(CharSequence delimiter,CharSequence prefix,CharSequence suffix)*/

// importing StringJoiner class  
import java.util.StringJoiner;  
public class StringJoinerExp 
{  
    public static void main(String[] args) 
    {  
        StringJoiner a = new StringJoiner(",", "[", "]");   // passing comma(,) and square-brackets as delimiter   
        StringJoiner b = new StringJoiner(",", "{", "}");   // passing comma(,) and square-brackets as delimiter   
        a.add("Rahul");  
        a.add("Raju");  
        a.add("Babu");  
        a.add("Kalu");  
        b.add("Pooja");
        b.add("Priya");
        b.add("Pinki");
        System.out.println(a);  
        System.out.println(b);  
        StringJoiner merge = a.merge(b);   
        System.out.println(merge);  
    }  
}  

Join String by a delimiter

StringJoiner sj = new StringJoiner(",");
        sj.add("aaa");
        sj.add("bbb");
        sj.add("ccc");
        String result = sj.toString(); 
		
		Join String by a delimiter and starting with a supplied prefix and ending with a supplied suffix.

	StringJoiner sj = new StringJoiner("/", "prefix-", "-suffix");
        sj.add("2016");
        sj.add("02");
        sj.add("26");
        String result = sj.toString();
		
		Join String by a delimiter.

	//2015-10-31
	String result = String.join("-", "2015", "10", "31" );
	
	
	Join List example.

	List list = Arrays.asList("java", "python", "nodejs", "ruby");

	//java | python | nodejs | ruby
	String result = list.stream().map(x -> x).collect(Collectors.joining(" | "));