Inappropriate Static

Static should not be used on functions that could be modified/run differently via polymorphism. For example,

HourlyPayCalculator.calculatePay(employee, overtimeRate)

could change and be inherited from for different kinds of employees or other reasons, and thus should not be static.



bj 2019-09-22