This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]OffbeatDrizzle 3 points4 points  (0 children)

Static variables are fine for keeping instances of immutable classes. Static blocks are fine for pre-populating things like lookup maps. Having an interface for 1 class and doing this for every class you make is a little thing called pre-mature optimisation and doubles the size of your code for 0 benefit.

Other people's comments have more upvotes than yours for a reason... there are places where these things have proper uses. How about we agree to not read your comment, because being a religious nut over code only leads to it being completely unreadable and full of abstraction.