StringBuilder in Java

StringBuilder was introduced in Java 1.5 (5.0). StringBuilder is mutable sequence of characters. This class is almost similar to StringBuffer, but with no guarantee of synchronization i.e. instances of StringBuilder are not safe in multithreaded environment. If such is the case then it is recommended that the StringBuffer is used. Avoiding the overhead of synchronization makes the StringBuilder very slightly faster.

Related Post

java.util.regex.PatternSyntaxException: Unclosed character class
How to know which java version is installed in linux?
Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
java.lang.UnsupportedClassVersionError: Bad version number in .class file

Comments

Leave a Reply