Java StringBuilder class.

Java 8Object Oriented ProgrammingProgramming

The StringBuilder class was introduced as of Java 5 and the main difference between the StringBuffer and StringBuilder is that StringBuilder’s methods are not thread safe (not synchronized).

It is recommended to use StringBuilder whenever possible because it is faster than StringBuffer. However, if the thread safety is necessary, the best option is StringBuffer objects.

raja
Published on 12-Feb-2018 13:03:06
Advertisements