StringJoiner
Utility method to construct a string with desired delimiter
StringJoiner strJoiner = new StringJoiner(",");
strJoiner.add("Hello").add("Bye");
System.out.println(strJoiner);
strJoiner.add("Hello").add("Bye");
System.out.println(strJoiner);
// Hello,Bye
No comments:
Post a Comment
Note: only a member of this blog may post a comment.