My question is pretty simple:
Does the compiler treat all the methods in a final class as being final themselves? Does adding the final keyword to methods in a final class has any effect?
I understood that final methods have a better chance of getting inlined and this is why I am asking.
Thanks in advance.
You’re correct, all methods in a final class are implicitly final.
See here:
And here:
This may also be of interest for you: Performance tips for the Java final keyword