Skip to content

Instantly share code, notes, and snippets.

@dangnhdev
Created February 7, 2016 04:47
Show Gist options
  • Save dangnhdev/97c14a66958efc06e330 to your computer and use it in GitHub Desktop.
Save dangnhdev/97c14a66958efc06e330 to your computer and use it in GitHub Desktop.
/**
*
* @author NguyenHaiDang@ActiveStudy
*/
public class StringJoinerExample {
public static void main(String[] args) {
StringBuffer sb = new StringBuffer();
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