Created
February 7, 2016 04:53
-
-
Save dangnhdev/05a1025508c9a96732b3 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
/** | |
* | |
* @author NguyenHaiDang@ActiveStudy | |
*/ | |
public class StringJoinerExample { | |
public static void main(String[] args) { | |
StringBuilder sb = new StringBuilder(); | |
sb.append("Hello").append(" ").append("World"); //có thể nối liên tiếp | |
String s = sb.toString(); //phải gọi toString() để lấy chuỗi ta cần | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment