StringJoiner is a class in Java that is used to join multiple strings together, optionally adding a delimiter between them. Here's an example code that demonstrates the usage of StringJoiner:
Sample CodeStringJoiner strJoiner = new StringJoiner(".");
strJoiner.add("AAA").add("BBB");
System.out.println(strJoiner);
OutPut:
AAA.BBB