Created
February 7, 2016 05:11
-
-
Save dangnhdev/078bfb51d7c7fa7370cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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