Strong Root


결론

* StringBuilder 는 사용할 필요가 없다.

* Thread Safe 가 필요하면 StringBuffer, 그렇지 않으면 String


 

String

StringBuffer 

저장공간 (Storage Area)

CSP (Constant String Pool)

힙 (Heap)

성능 (Performance)

빠름 (Fast)

느림 (Slow)

Thread Safe

No

Yes






Why (작성중)

StringBuilder 는 사용할 필요가 없다.

작성중





Thread Safe 가 필요하면 StringBuffer, 그렇지 않으면 String

작성중






출처

1. GrepCode

 * http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java

 * http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/AbstractStringBuilder.java

 * http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/StringBuilder.java

 * http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/StringBuffer.java


2. Articles & Blogs

 * http://javahungry.blogspot.com/2013/06/difference-between-string-stringbuilder.html

 * https://slipp.net/questions/271

 * http://namocom.tistory.com/360