the Constant Interface Antipattern is about defining constants in interfaces and then let the classes, in which these constants are used, implement these interfaces.
It is a kind of workaround for some people because in Java a Class can't inherit from multiple classes (but it can implement multiplei nterfaces)
If you do a search for this you should find plenty of threads on the net, e.g.:
The reason why this is a bad idea is that the interface, instead of specifying a contract for behavior (methods), just passes some not too meaningful constants around. You're much better off creating a class.
The real problem about implementing John's interface is that all classes implementing it now expose public A_CONSTANT_INT and A_CONSTANT_STRING fields for the whole world to see, and once these classes have been used by other classes, those fields can't be changed for fear of "breaking" those unsuspecting "other classes".
One of the reasons for adding enums to Java is to avoid the constant interface anti-pattern.
In prior releases, the standard way to represent an enumerated type was the int Enum pattern:
This pattern has many problems, such as:
Not typesafe - Since a season is just an int you can pass in any other int value where a season is required, or add two seasons together (which makes no sense).
No namespace - You must prefix constants of an int enum with a string (in this case SEASON_) to avoid collisions with other int enum types.
Brittleness - Because int enums are compile-time constants, they are compiled into clients that use them. If a new constant is added between two existing constants or the order is changed, clients must be recompiled. If they are not, they will still run, but their behavior will be undefined.
Printed values are uninformative - Because they are just ints, if you print one out all you get is a number, which tells you nothing about what it represents, or even what type it is.