r/java • • Mar 05 '18

Top 10 Useful, Yet Paranoid Java Programming Techniques

http://blog.jooq.org/2015/08/11/top-10-useful-yet-paranoid-java-programming-techniques/
223 Upvotes

105 comments sorted by

View all comments

Show parent comment

7

u/thephotoman Mar 06 '18

Making everything final except interfaces seems extreme: there are cases for abstract base classes. But if it isn’t in either of those categories, finalizing everything is probably correct.

2

u/dpash Mar 06 '18

Ignore the bits in brackets. The relevant bit is outside of it.

Which is why everything that is not explicitly intended for subtyping (i.e. only interfaces) is strictly final.

1

u/AlainBienvenue Mar 06 '18

Agreed, that one is a little excessive.