If all methods are final, the current behavior of the StringBuilder cannot be changed. Subclasses of it should add either unrelated behavior (in fact, poor design), or new functionality that uses old, for example, convenience methods. If you want to do the latter, it's probably best to have a class that provides the appropriate functionality, but contains a StringBuilder rather than extending it. As Joshua Bloch says, "they prefer containment over inheritance." In short, if all methods are final, there is no good reason to extend the class, and you can also make it final.
DJClayworth
source share