Types: CS 310 Lecture notes

Object-Oriented Programming with Java Lecture Notes

10 February 2009 • Types


The StringBuilder class was added to Java 5; prior to that you'd have to favor StringBuffers. String buffers are protected against concurrent access via mutexes, while string builders are not. In the absence of concurrent access, it's cheaper to call string-builder methods than it is to call string-buffer methods.


This page last modified on 24 January 2006.