Is it beneficial to make private methods final? Would that improve performance?
I think "private final" doesn't make much sense, because a private method cannot be overridden. So the method lookup should be efficient as when using final.
And would it be better to make a private helper method static (when possible)?
What's best to use?
private Result doSomething()
private final Result doSomething()
private static Result doSomething()
private static final Result doSomething()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…