While we all understand that to declare constants (for brevity reasons) in an interface as opposed to a class is evil because it pollutes namespace for and post Java 5 you can use static imports to reduce verbosity (Effective Java Item 17). However, a colleague of mine pointed out that a developer can miss out declaring the variable as final (public and static can be discounted as absence of it would be a compilation error) when defining it in a class whereas they come implicitly for interfaces. Any arguments for/against it? I guess this might have been discussed at length before as it seems pretty rudimentary, but my google-fu is not helping me today :). Would appreciate if someone can opine here or point me to a place where this may have already been discussed.
Thanks in advance!
EDIT:
The interface file thus defined will not be used in the class hierarchy of its clients but will purely serve to house constants.
If using a post Java 5 SDK, then why not evaluate Enums instead of using interfaces to define, public static constants. Nevertheless, nothing wrong in the approach though.