My question is basically the same as this one, but does this also apply to static
functions?
I want to understand:
static
functions in a final
class as final
?final
keyword to static
functions in a final
class have any effect?In a final class, all methods are implicitly final as well because making the class final means it cannot be inherited from and thus there can be no hiding or overriding of its methods in child classes.
As a result, effectively you are correct that a static method in a final class is final, but it's not because of the fact that it's a static method. It's because the class is final.