6. Final classes by default
Item 17 in “Effective Java” suggests that every class should either not be sub-classable or be carefully designed and documented to support inheritance. In Java, every class can be subclassed unless you explicitly specify the class as final. If you forget to make the class final and fail to design and document it for inheritance, there will be trouble when clients think that they can create subclasses, override some methods and assume that everything will still work as expected.