I heard that we should not declare the constants in Interface to access them in concrete class which is called Anti pattern.
Is it true? If so please let me know what are the other ways where I declare constants and use them
Thanks Srinivas Ivaturi.
posted 11 years ago
Declare them in class itself. (a) You can create Enumeration classes to contain enum type constants. OR (b) You can have a package level class containing constants to be used across the classes in that package. (c) Point is that never declare the constants in the Interface. Interface is not meant for this purpose.