Skip to content

Instantly share code, notes, and snippets.

@dangnhdev
Created February 7, 2016 05:11
Show Gist options
  • Save dangnhdev/078bfb51d7c7fa7370cf to your computer and use it in GitHub Desktop.
Save dangnhdev/078bfb51d7c7fa7370cf to your computer and use it in GitHub Desktop.
import java.util.StringJoiner;
/**
*
* @author NguyenHaiDang@ActiveStudy
*/
public class StringJoinerExample {
public static void main(String[] args) {
StringJoiner sj = new StringJoiner(", ", "{", "}");
sj.add("one").add("two").add("three");
System.out.println(sj.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment