Pet Hates

StringBuffer and how hard it is to get rid of legacy code

In 2006, Java 5.0 was released with StringBuilder, a more lightweight and sane version of StringBuffer. The Javadoc for Java 5.0 for StringBuffer notes As of release JDK 5, this class has been supplemented with an equivalent class designed for use by a single thread, StringBuilder. The StringBuilder class should generally be used in preference…

Read More