Java 8 StringJoiner Example

1 min read
Date: 2018-02-02
This tutorial demonstrates Java 8's StringJoiner
class, a tool for efficiently concatenating strings. Unlike earlier Java versions, StringJoiner
provides a direct method to join multiple strings using a specified delimiter, prefix, and suffix. The tutorial details its constructors and methods, then walks through creating a Java Maven project in Eclipse and implementing a StringJoiner
example. The example showcases joining strings from various sources. String.join()
is also mentioned as an alternative.
Read more: https://examples.javacodegeeks.com/core-java/java-8-stringjoiner-example/
0
Subscribe to my newsletter
Read articles from Yatin B. directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
