What happens if we declare a method both static and final?

Last Updated :
Discuss
Comments

What happens if we declare a method both static and final?


Compilation error

The method cannot be overridden

The method can be overridden

Runtime error


Share your thoughts in the comments