Does whole-module-optimisation make final redundant?

If the compiler is given the opportunity to analyse the entire module, will it be able to identify which methods are never overriden and can therefore be regarded as final?


Or should we use continue to use final as a way of declaring a method as never to be overridden?

Replies

If you use the final modifier only to optimize yes. But is still useful when you really want avoid some override in the future.