So I have looked around google and SO , I cannot find a example or explanation of : What is the purpose of static
final
methods in enum
?
What I understand :
- Methods declare
static
can be accessed like function/procedural languages. final
means you can't override it. Can't change the reference. As assylias pointed out in commentsstatic
can't be overridden either.enum
s can't be subclassed, explained here.
So what's the point of static
final
methods in enum
s if it will never be overridden since there won't be a subclass?